Earlier quoted context omitted.
Which is why you are both right: Offsets are good for past events, time zones for future ones. It's a real pain to deal with..
If you're using the Olsen Database[0], aren't past (and future) changes all handled properly? [0] https://en.wikipedia.org/wiki/Tz_database See: Example zone and rule lines
Why You Should Use Timezone Offsets Not Timezone Names
31–40 of 51 posts
Re: Why You Should Use Timezone Offsets Not Timezone Names
#32Earlier quoted context omitted.
I wish they could at least store it in terms of the timezone name, like "Central Time". "America/Chicago" bothers me because I don't know what cities are and aren't in your timezone database. The ones that have a tiny map that you have to click on are also pretty bad.
CST is not the same thing as America/Chicago. If you say CST you specifically do not mean daylight savings time, which is CDT.
Re: Why You Should Use Timezone Offsets Not Timezone Names
#33I just DONT want to deal with time EVER. It's such a mess. Can't we just.. i don't know. throw away the current system and actually build something that a programmer can understand? Who counts to 24 and 60 anyway?
Re: Why You Should Use Timezone Offsets Not Timezone Names
#34This is apparently an argument against UTC, but I think it's an argument against local time instead - humans comparing times stored in different timezones causes a lot of errors.
Re: Why You Should Use Timezone Offsets Not Timezone Names
#35Also, when presenting times to users, knowing what timezone they're in, helps us display the dates with the correct offsets (without need to change it twice a year).
Timezone codes are useful. They're better in offsets in any way since they contain more data. It's one of those headaches for developers that save headaches to the users.
Re: Why You Should Use Timezone Offsets Not Timezone Names
#36I collect the users city on my site using gps/browser location opt in, or by autocomplete against google locations. Has anyone figured out a way for me to get the users timezone from their city?
Re: Why You Should Use Timezone Offsets Not Timezone Names
#37Secondly, time units do not have a fixed reference clock. `Second` is clocked by the Universe, `day` is clocked by midnight and year is clocked by New Year. Generally, by `time` we mean "distance in time since last Midnight in one second resolution" and that includes single clock source. By `date` we generally mean "distance in time since last particular arbitrary event in one day resolution", which includes two clock sources (midnight and new year). This gets rather awkward, but both sources get controlled by the "particular arbitrary event", therefore we can handle that. Combining both definitions into "distance in time since arbitrary event in one second resolution" gives us `datetime`, controlled by three clock sources. Thing are bound to get awkward.
Lastly, as others have already pointed out, all this makes definitions of future events in `datetime` pretty much useless, because there is no way to predict how many ticks clock sources will generate, unless you stick with one (e.g. n Universe clocked seconds from NOW (isn't TAI exactly that?)) and deal with fluctuating clock sources in the future.
Neither solution solve inherent problems with multi-clocked `datetime` definition only might make some problems easier to solve by shifting clock tracking to frontend: 2051-09-12 16:23:00 +0300 does not need to keep track of clock sources while 2051-09-12 16:23:00 Europe/Vilnius does.
The whole "Bonus" section is about arbitrary{ty|ness} of "last midnight" - how long ago did it actually happen for this moving target? Should I consider offset from last midnight from time I have actually seen it or when it was supposed to be seen here? Automatic time zone settings attempt to do the latter. And if you want former semantics, well just do not use automagic and add whole new clock source to this mess - "distance in time since last time I personally thought it was midnight".
Re: Why You Should Use Timezone Offsets Not Timezone Names
#38Earlier quoted context omitted.
CST is not the same thing as America/Chicago. If you say CST you specifically do not mean daylight savings time, which is CDT.
Sure, but the parent didn't say "CST". For a user-facing interface, presenting random city names is terrible. "Central Time" is a known entity among users, and they implicitly assume that it will take care of the difference between CST and CDT (and in fact, the named timezone CST6CDT does exactly that). Hell, if Chicago one day decided to be like a few of the "weird" US cities and not follow the standard DST schedule…
Re: Why You Should Use Timezone Offsets Not Timezone Names
#39Earlier quoted context omitted.
If you're using the Olsen Database[0], aren't past (and future) changes all handled properly? [0] https://en.wikipedia.org/wiki/Tz_database See: Example zone and rule lines
I suppose storing the offset is safer, because you have in a single string all you need to know to convert the time to UTC, but yes, that was my thought as well -- given a non-broken copy of tzdata, historical dates should be correctly convertible if all you have is a date/time and a timezone name.
Re: Why You Should Use Timezone Offsets Not Timezone Names
#40The political realities of timezones is _exactly why_ you should be storing the timezone name if the user is scheduling it for an event in their local timezone. If a user is expecting an event to happen at 6pm in their local timezone, and political reasons cause that timezone's offset to change (ie. daylight savings), it will still happen at the correct local time for that user. Storing UTC offsets means that any fut…
I wish they could at least store it in terms of the timezone name, like "Central Time". "America/Chicago" bothers me because I don't know what cities are and aren't in your timezone database. The ones that have a tiny map that you have to click on are also pretty bad.