I am storing schedules in the database as a day of the week, hour and minute. When the data is read we create a DateTime
object for the next occurrence of that day, hour and minute, but I need to modify this to be DST-aware. I am able to modify the database if necessary.
I know that DateTimeOffset
stores a UTC date/time and an offset. I also know from this MSDN blog entry that DateTimeOffset
should be used to "Work with daylight saving times".
What I'm struggling to understand is exactly how DateTimeOffset
"work(s) with daylight saving times". My understanding, little that there is, is that daylight saving times are a political decision and cannot be inferred from purely an offset. How can it be that this structure is DST friendly if it only stores an offset and not a named timezone or country?