4 ms·
The key thing to realize about DST IMO, is the fact that time zone is adjusted for it. So for example I live in Europe/Oslo, which is UTC+02 when DST is in eff
by codetrotter 5y ago
The key thing to realize about DST IMO, is the fact that time zone is adjusted for it.
So for example I live in Europe/Oslo, which is UTC+02 when DST is in effect (CEST). When DST is not in effect, my time zone becomes UTC+01 (CET).
And therefore, when we adjust our clocks, time is not really moved.
Although it may seem like the time turns back from 3 AM to 2 AM on 31 October 2021 in my location, that’s only true if you don’t take the time zone into account.
What actually happens is we go from:
2021-10-31T02:59:59.999…+0200
to:
2021-10-31T02:00:00.000…+0100
And we see then that if we convert this time to UTC, we have simply a transition from:
2021-10-31T00:59:59.999…Z
to:
2021-10-31T01:00:00.000…Z
So actually, nothing bad happened.
The article also says as much, but I wanted to comment on how I think about it when I consider DST, because I think it’s a pretty straight forward way to look at it.
- tshaddox 5y agoJust to clarify the terminology, since you seem to be referring to the widely-used tz database, "time zone" is defined as a geographic region where local clocks agree year-round. Europe/Oslo is one such time zone in the tz database. Thus your time zone does not change when DST begins and ends, only your UTC offset.
- codetrotter 5y agoYes I may have formulated that part a bit clumsily. What I mean to convey is that the time zone changes between CEST and CET. And this in turn means different UTC offsets. The Europe/Oslo identifier from the time zone databases was meant for context, but may have made what I tried to say less clear, sorry about that.
- birdman3131 5y ago(Caveat that this may be US specific.) For the Central time zone there are 2 variants. CST and CDT. Most people will wrongly use CST to mean both variants but that is incorrect. Central Standard Time only applies when daylight savings is off and Central Daylight Time only applies when it is on. The same is true for say PST and PDT.
- mdavidn 5y agoCST and CDT are known as a single time zone, America/Chicago, in the tz database. The tz database can convert UTC times into local Chicago time. It even accommodates historic changes in DST law, like changes to the start date in prior years.
- tshaddox 5y agoIt's common to casually refer to "CST" and "CDT" as "time zones." I was only pointing out that in the specific context of the tz database, "time zone" has a specific definition that is distinct from individual UTC offsets.
- jrockway 5y agoYeah. CST is a sloppy term; your computer is going to be America/Chicago or America/Indiana/Indianapolis (for the weird one that doesn't use DST), and those are unambiguous. (While researching this comment, I found that Indiana has at least 8 different time zones, so ... good luck with that.) I don't know if you can type things like "CST" into Debian, but I don't think you can.
- jcranmer 5y ago> (While researching this comment, I found that Indiana has at least 8 different time zones, so ... good luck with that.) This is kind of the weakness with the IANA time zone classification. This defines time zones as the set of clocks that have shared the same time since 1970, so every time an Indiana county decided it wanted to move from Eastern to Central or vice versa, it got split into its own timezone. It reflects a level of precision that is perhaps greater than Indianans themselves actually keep. [Also, FWIW, Indiana does observe DST now.]
- LukeShu 5y ago> CST is a sloppy term; It's not though, it means "Central Standard Time", which is UTC-06:00. It is sometimes sloppily misused to mean "Central Time", which is a sloppy term, meaning either UTC-06:00 (CST) or UTC-05:00 (CDT) depending on the time of year and where you are in the country. > or America/Indiana/Indianapolis (for the weird one that doesn't use DST) 1. You mean `America/Indiana/Knox` or `America/Indiana/Tell_City` or historically almost any of the other `America/Indiana/…` zoneinfo files except for Indianapolis. Indianapolis has "always" (since 1961) been "Eastern" rather than "Central", it's other non-Indianapolis regions of Indiana that have been "Central, but without DST". 2. But regardless, it's outdated; all of Indiana has been doing DST since 2006; mostly Eastern (EDT/EST), but a few western parts of the state are Central (CDT/CST). > (While researching this comment, I found that Indiana has at least 8 different time zones, so ... good luck with that.) They only still exist for pre-2007 dates; for post-2007 dates they're all equivalent to either America/Chicago (…/Knox and …/Tell_City) or America/New_York (the other 6 of them). > I don't know if you can type things like "CST" into Debian, but I don't think you can. It's inconsistent. You can type in EST or MST, but not CST.
- saurik 5y agoIt seems pretty clear from the example that the commenter is using time zone to not mean entries from the tz database but instead offsets from UTC.