Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetAmbiguousTimeOffsets() [1/2]

TimeSpan[] System.TimeZoneInfo.GetAmbiguousTimeOffsets ( DateTime dateTime)
inline

Definition at line 1015 of file TimeZoneInfo.cs.

1016 {
1018 {
1019 throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, "dateTime");
1020 }
1022 if (dateTime.Kind == DateTimeKind.Local)
1023 {
1024 CachedData cachedData = s_cachedData;
1026 }
1027 else if (dateTime.Kind == DateTimeKind.Utc)
1028 {
1029 CachedData cachedData2 = s_cachedData;
1031 }
1032 else
1033 {
1035 }
1036 bool flag = false;
1037 int? ruleIndex;
1040 {
1043 }
1044 if (!flag)
1045 {
1046 throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, "dateTime");
1047 }
1048 TimeSpan[] array = new TimeSpan[2];
1050 if (adjustmentRuleForAmbiguousOffsets.DaylightDelta > TimeSpan.Zero)
1051 {
1052 array[0] = timeSpan;
1054 }
1055 else
1056 {
1058 array[1] = timeSpan;
1059 }
1060 return array;
1061 }
static readonly TimeZoneInfo s_utcTimeZone
readonly TimeSpan _baseUtcOffset
static CachedData s_cachedData
DaylightTimeStruct GetDaylightTime(int year, AdjustmentRule rule, int? ruleIndex)
static bool GetIsAmbiguousTime(DateTime time, AdjustmentRule rule, DaylightTimeStruct daylightTime)
static DateTimeOffset ConvertTime(DateTimeOffset dateTimeOffset, TimeZoneInfo destinationTimeZone)
AdjustmentRule GetAdjustmentRuleForAmbiguousOffsets(DateTime adjustedTime, out int? ruleIndex)

References System.TimeZoneInfo._baseUtcOffset, System.SR.Argument_DateTimeIsNotAmbiguous, System.array, System.TimeZoneInfo.ConvertTime(), System.Runtime.Serialization.Dictionary, System.TimeZoneInfo.GetAdjustmentRuleForAmbiguousOffsets(), System.TimeZoneInfo.GetDaylightTime(), System.TimeZoneInfo.GetIsAmbiguousTime(), System.TimeZoneInfo.s_cachedData, System.TimeZoneInfo.s_utcTimeZone, System.TimeZoneInfo.SupportsDaylightSavingTime, and System.TimeSpan.Zero.