March 2002
Intermediate to advanced
864 pages
31h 8m
English
DaylightTime
This setting defines when Daylight Saving Time begins and ends. It uses
three properties: Start is the time when Daylight Saving
Time begins; End
is when standard time resumes; and Delta is the length
of time (measured in
ticks) that the clock is adjusted from standard time during this period. Delta is a System.TimeSpan value
measured in “ticks” or 100 nanosecond periods.
public class DaylightTime { // Public Constructors public method DaylightTime(DateTime start, DateTime end, TimeSpan delta); // Public Instance Properties public field TimeSpan Delta{get; } public field DateTime End{get; } public field DateTime Start{get; } }
System.TimeZone.GetDaylightChanges()
System.TimeZone.IsDaylightSavingTime()