You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printfn $" Begins at {daylightStart.TimeOfDay:t} on the {enum<WeekOfMonth> daylightStart.Week} {daylightStart.DayOfWeek} of {dateInfo.GetMonthName daylightStart.Month}"
37
+
// Display information on fixed date rule
38
+
else
39
+
printfn $" Begins at {daylightStart.TimeOfDay:t} on {dateInfo.GetMonthName daylightStart.Month} {daylightStart.Day}"
printfn $" Ends at {daylightEnd.TimeOfDay:t} on the {enum<WeekOfMonth> daylightEnd.Week} {daylightEnd.DayOfWeek} of {dateInfo.GetMonthName daylightEnd.Month}"
46
+
47
+
// Display information on fixed date rule.
48
+
else
49
+
printfn $" Ends at {daylightEnd.TimeOfDay:t} on {dateInfo.GetMonthName daylightEnd.Month} {daylightEnd.Day}"
50
+
51
+
// A portion of the output from the example might appear as follows:
52
+
// Tonga Standard Time transition time information:
53
+
// Time zone information:
54
+
// Base UTC Offset: 13:00:00
55
+
// Supports DST: False
56
+
// No adjustment rules defined.
57
+
// Samoa Standard Time transition time information:
58
+
// Time zone information:
59
+
// Base UTC Offset: 13:00:00
60
+
// Supports DST: True
61
+
// Adjustment Rules: 4
62
+
// Adjustment rule from 1/1/0001 to 12/31/2009:
63
+
// Delta: 00:00:00
64
+
// Begins at 12:00 AM on January 1
65
+
// Ends at 12:00 AM on January 1
66
+
// Adjustment rule from 1/1/2010 to 12/31/2010:
67
+
// Delta: 01:00:00
68
+
// Begins at 11:59 PM on the Last Saturday of September
69
+
// Ends at 12:00 AM on the First Friday of January
70
+
// Adjustment rule from 1/1/2011 to 12/31/2011:
71
+
// Delta: 01:00:00
72
+
// Begins at 3:00 AM on the Fourth Saturday of September
73
+
// Ends at 4:00 AM on the First Saturday of April
74
+
// Adjustment rule from 1/1/2012 to 12/31/9999:
75
+
// Delta: 01:00:00
76
+
// Begins at 12:00 AM on the Last Sunday of September
77
+
// Ends at 1:00 AM on the First Sunday of April
78
+
// Line Islands Standard Time transition time information:
The following is a small portion of the output that is generated by the example. The exact output will vary depending on the operating system and the date on which the example is run.
@@ -253,6 +254,7 @@ dateVariable.Date
253
254
The following example creates an alternate Central Standard Time zone and defines three adjustment rules for the periods 1976-1986, 1987-2006, and 2007 and beyond. These rules are added to a generic <xref:System.Collections.Generic.List%601> object whose elements are then copied to a <xref:System.TimeZoneInfo.AdjustmentRule> array. This array is then used in the call to the <xref:System.TimeZoneInfo.CreateCustomTimeZone%28System.String%2CSystem.TimeSpan%2CSystem.String%2CSystem.String%2CSystem.String%2CSystem.TimeZoneInfo.AdjustmentRule%5B%5D%29?displayProperty=nameWithType> method.
The following example displays information about all of the time zones defined in the local computer's system registry, including the starting and ending dates of their adjustment rules.
The following example displays information about all of the time zones defined in the local computer's system registry, including the starting and ending dates of their adjustment rules.
The following example calls the <xref:System.TimeZoneInfo.AdjustmentRule.Equals%28System.TimeZoneInfo.AdjustmentRule%29?displayProperty=nameWithType> method to compare the adjustment rules for Central Standard Time with those for Canada Central Standard Time and Mexico Standard Time.
0 commit comments