• Foo AKA Fooo (unregistered)

    Which, using "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" is also problematic per se. These countries use DST, so when that's in use (like, right now, and in fact most of the year), they're GMT+2. Which, also merging these countries together may be a problem in the future. Say the EU decides to abandon DST and lets each country choose whether to remain their current DST or non-DST forever (which there actually are good arguments for, so probably won't happen), so these countries might be in different time zones then, and if you store them like that in your database, you'll have to sort them all out. (Which, it's not only the EU, of course. What if e.g. ZW decides to use a different timezone from ZA at some point?)

  • SG (unregistered)

    A nice touch is that the list items only have display text... no value representation. Which probably means that they're either storing the display text as an identifier somewhere, parsing the display text to extract the timezone offsets... or most likely, both.

  • blah (unregistered)

    Where do they handle DST? (I would not be surprised if the answer was "nowhere".)

  • Sauron (unregistered)

    Time zones are the real WTF.

    The time of the day is essentially some interpretation of complex celestial mechanics phenomenons, in particular the rotation cycle of the Earth around itself.

    Timezones are not suitable to represent that accurately. Timezones are some social tool made to give a standard basis to help people not miss their train and clock in & out to work accurately (but even that is not simple when there are long distances involved, or near the Earth's poles, etc).

    And that's why timezones are wrong. That social representation of time just doesn't fit seamlessly into physical reality. Celestial mechanics doesn't give a damn about the social needs of mere mortals, nor about where they draw meridians & borders, nor about the need (or lack thereof) of daylight saving time.

    The Sun and the Earth aren't just a collection of bytes in the RAM of computers.

  • (author) in reply to Sauron

    I would make the argument that timezones aren't meant to accurately represent physical reality, but as you point out- fulfill the needs of mere mortals to coordinate efforts. As our coordination needs get more complicated, our timekeeping and coordinating systems also have to get more complicated. Once upon a time, noon was always when the sun was at its zenith, wherever you were. But that doesn't work anymore, because we all need a common definition of noon. And since it'd be inconvenient to just set noon for the world based on one location (UTC)- time zones.

  • LZ79LRU (unregistered)

    What we need is a completely new system. One based around true time. Start with a year, divide it into exactly 365 days. Divide each day into two halves of 10 hours of 10 minutes of 10 seconds each. Scale the seconds to match. Next set up one single universal time zone for everyone to use. None of this local time garbage. Noon should be when the sun is at its zenith at the point of measuring. And to be PC and make sure nobody feels left out have that point move 1 / 365 of the worlds diameter every day so that each spot on earth gets it's one day where local noon equals true noon.

  • netmunky (unregistered)

    Timezones get even more "fun" when business decides they want it listed as EST, CST, MST, PST, which are not unique identifiers. Then you get a developer writing C# code on windows, but the production system runs on linux, so TimeZoneInfo.GetSystemTimeZones returns different results depending on the system. If you enumerate TimeZoneInfo.GetSystemTimeZones on windows, there is no CST, so he just skipped timezone adjustments when running on his local dev environment. But if you enumerate TimeZoneInfo.GetSystemTimeZones on linux, you get 2 CST zones, one in Central/South America, and one in North America, and they are not the same. When the developer doesn't know this, they just see that the time is off by an hour, so they adjust it, making all other time zones off by an hour.

  • dusoft (unregistered) in reply to Foo AKA Fooo

    Say the EU decides to abandon DST and lets each country choose whether to remain their current DST or non-DST forever

    This has been already an option for a couple of years - however no member state has decided to abandon their DST so far.

    Captcha: stairs, yeah

  • (nodebb)

    The time of the day is essentially some interpretation of complex celestial mechanics phenomenons, in particular the rotation cycle of the Earth around itself.

    Timezones are not suitable to represent that accurately. Timezones are some social tool made to give a standard basis to help people not miss their train and clock in & out to work accurately

    Question any random set of people waiting at a station to commute to work at the beginning of the day and almost all of them would say getting to work on time is more important to them than the precise location and orientation of the Sun, relative to Earth.

    Time zones are an essential tool for a human society where communication happens faster than a galloping horse. You could argue for only one time zone for the whole globe, but that would mean each foreign country you travel to would have a different bedtime, wake up time and lunch time.

    Handling time zones is a solved problem on computers (notwithstanding the articles that appear on this web site routinely) so why shouldn't we arrange our time system for convenience of the vast majority of humans.

  • LZ79LRU (unregistered)

    so why shouldn't we arrange our time system for convenience of the vast majority of humans.<

    Because that wouldn't cause our inner ear to tingle. And decimal nightmaretime does.

  • (nodebb) in reply to LZ79LRU

    Start with a year, divide it into exactly 365 days.

    Your system breaks with the first sentence. The Earth's year is 365.2564 days. If you divide it up into 365, midnight and noon would have to get later every day, even if you stay in the same spot.

  • (nodebb) in reply to LZ79LRU

    Because that wouldn't cause our inner ear to tingle

    I've got alcohol for that.

  • (nodebb)

    I once had a project which necessitated me looking in detail at IANA vs Windows (or in general, Microsoft) timezones, and if I recall correctly, the IANA list is an unmitigated mess, whereas the Windows list is far more accurate and manageable. Just use the .NET TimeZoneInfo and other related classes and you are all set. If you need to get the IANA timezone from the corresponding MS one or back (to the extent that it's possible, again because IANA is a mess), there are a few libraries to do that conversion.

    The code in the article is obviously terrible, but the solution presented as the correct one - maintaining a database of IANA timezones - is also subpar.

  • OldCoder (unregistered) in reply to jeremypnet

    You've obviously never traveled in Europe, then. Germany, France, Spain and Italy have very different ideas of when one should eat breakfast, lunch and their evening meal.

  • (nodebb) in reply to LZ79LRU

    But putting the noon at 365 distinct longitudes won't let "everywhere" have a noon; there will be plenty of places between those longitudes that will never get their own noon. Clearly, we need to take the leftover fraction of a day in the year and use that to shift the zero-point by a bit every year.

    If we make the system complicated and arbitrary enough, then everyone would rather go to war than ask "what time is it?" At that point, mission accomplished.

  • Time Nut (unregistered)

    Wow, some of the comments. Why do most IT people not understand time correctly.

    First we have thank about local solar time. That defines noon as when the sun directly overhead. Think of it as infinite number of time zones. When the fastest mode of travel was walking or horseback, it was fine. A sundial was the best way of keeping time. When we got to ways to travel faster or started putting up telegraphs lines, the need started to have timezones, thus local civil time.

    If define a day a solar day as noon to noon, (note that a sidereal day is not noon to noon, but one rev of the earth), then a year does not divide into a integer number of days.

  • (nodebb) in reply to LZ79LRU

    What we need is a completely new system. One based around true time. Start with a year, divide it into exactly 365 days. Divide each day into two halves of 10 hours of 10 minutes of 10 seconds each. Scale the seconds to match. Next set up one single universal time zone for everyone to use. None of this local time garbage. Noon should be when the sun is at its zenith at the point of measuring. And to be PC and make sure nobody feels left out have that point move 1 / 365 of the worlds diameter every day so that each spot on earth gets it's one day where local noon equals true noon.

    The old SNL sketch of the "Metric Leisure Week" comes to mind.

  • Science Gone Bad (unregistered) in reply to Mr. TA

    I also had to go in depth on Microsoft Time zones in order to meet a NASA requirement that all clocks in a system group could be no greater than 50ms from UTC and also from each other. Satellite control software. Windows time access make INAL time zones look sane.

    1. There isn't any easy way to set the system time to GMT w/o setting it's location to Greenwich (Or Katmandu Africa ) Time is ONLY decided by location. Unix systems keep UTC @ the HW level.

    2. There is no such thing as UTC in windows .... Windows GMT is set in Greenwich, but actually uses British local time which has DST from May to Sept. Satellites use UTC which syncs to GMT most of the time.

    3. The ONLY true GMT is in Katmandu Africa (no DST/etc.). Therefore in order to get something close to UTC, all systems have be located in Katmandu according to Windows

    4. There's at least 12-20 ways to get a time in Windows. None of them are the same, & it's rare that they actually match up. Domain Controllers, Directories, files, and all kinds of non-time related objects all have their own way of getting a time. They might be consistent w/in the object, but not to any master clock (there is none)

    5. Time also is a 1st response item .... seriously. Whom or Whatever responds 1st is the master source, so PDCs, other DCs, the local system, or even another system that the current system happens to be talking with (File Severs, SQL, etc.) can become the master source ... and they change

    The windows Admin solution to all this was NTP to a external Time source w/ a hard reset every 15 minutes. NTP runs on statistics which cannot become stable in 15 minutes ... usually several hours or so.

    Oh I forgot that VMs have/had this bad habit of having the clock drift backwards during every sleep cycle on a busy Hypervisor ... I personally saw 6+ minutes per day of drift. Those same Windows Admins fought me tooth & nail against setting the hypervisor clock via NTP & forcing a sync to the Hypervisor clock at the end of the sleep cycle.

  • Randal L. Schwartz (github)

    It's too bad Swatch time never caught on. Of course, they made the stupid-stupid mistake of having it be permanent UTC+1 instead of UTC, so even geeks weren't interested in it.

  • (nodebb)

    I wonder if this really is WTF code, or a boss that doesn't understand?

  • mihi (unregistered) in reply to Foo AKA Fooo

    If you followed Microsoft's Time Zone updates, you know that things like this have happened all the times (I think they even merged time zones when countries decided to use the same DST rules). Since on Windows, the time zone is mostly used for computers that are located in that time zone (as opposed to, scheduling events that happen in another time zone), it mostly affects computers that live in that time zone. And after the next Windows update, an admin that logs on next time gets a friendly reminder to check if their time zone is still correct.

  • (nodebb)

    Ironically there isn't a single correct & complete list of time zones available; it seems like an easy problem, but as soon as you start including historic time zones, you are in for a world of endless frustrations and suffering because spoiler, national borders were never also always in flux.

  • Aussie Susan (unregistered)

    Someplaces have even stranger time zones - Here in Australia we even have a couple of places (e.g. Broken Hill and Eucla) that have their own time zones that are fractions of an hour offset (UTC+8:45!!!), and not the same as the state they are in. https://www.timeanddate.com/time/zone/australia (I can understand the Eucla one - it is on the eastern edge of Western Australia that takes up nearly 1/3rd of the country with the time zone set for the main city that is on the west coast.) Susan

  • Andrew Klossner (unregistered) in reply to Foo AKA Fooo

    'using "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" is also problematic per se'

    You can trace that problem to Microsoft. This code uses the list of time zones from Windows 10.

  • Officer Johnny Holzkopf (unregistered) in reply to Foo AKA Fooo

    "Say the EU decides to abandon DST and lets each country choose ... " - yes, that was nearly 5 (five!) years ago, and still no result. There is no consensus among EU politicians, while EU voters have already voted for DST to be abolished. The national countries now have to decide for themselves, and they do not decide, because having to fiddle with clocks and watches two times a year for no good reason is something that keeps people busy. And it is a great excuse for things that don't work. Example: When the federal government in Germany held their last "emergency test day", some of the sirens went off one hour too early or too late (and not as intended at the published "alarm test time") - at least those that worked, while the majority didn't. Further "emergency test days" are not planned so far due to those "excellent" results.

  • (nodebb)

    At least they kept GMT+8 Perth separate.

    Windows never used to do that, it used to be lumped in with all the others in +8.

  • (nodebb)

    Physical time is a mess because none of the length of a day (Earth's rotational period), the length of a month (the Moon's orbital period), or the length of a year (the Earth's orbital period) line up with each other. Any time you try to simplify that, you'll find that reality won't cooperate.

    Human time is also a mess, but in this case it's because of people. Especially politicians but very much not just them. There's a huge list of timezones because they all have different rules. Many line up a lot of the time, but not always. (Timezones are mainly sets of rules for how to convert between actual timestamps and the forms seen by humans.) We delegate to specialised systems for handling the set of timezones precisely so we don't have to maintain that very-much-not-fixed mess ourselves.

  • (nodebb) in reply to LZ79LRU

    While we're at it, we should also switch from a base 10 to base 8 counting system as it's way more convenient for the modern computing age when everything is a power of 2.

  • LZ79LRU (unregistered) in reply to jeremypnet

    Your system breaks with the first sentence. The Earth's year is 365.2564 days. If you divide it up into 365, midnight and noon would have to get later every day, even if you stay in the same spot.<

    I am not talking about changing the duration of each day. Days are a good unit of time to keep fixed because they directly correspond to the day night cycle. But what you can do is change the year. Or, more precisely declare each year to end on the end of the 365th day. In other words, just ignore leap years entirely and pretend the "problem" does not exist.

    This basically has no downsides for anyone aside from the fact that it is going to lead to the seasons slowly drifting over time on your calendar. But frankly does it really matter if the arbitrary date we decided arbitrarily was the start of a season moves forward by 1 day every 4 years?

    And even if we say that it does and that it's supper important that the year has exactly the 4 seasons we want in exactly the "correct" order it would take decades for that effect to be noticeable anyway. We are talking about some 120 years for a full months worth of drift or just about 365 years for a full season (1/4 year) worth. By which point climate change is most likely going to make sure we don't get our seasons anyway.

  • Labasta (unregistered)

    Yes, we could reconfigure our fundamental understanding of how we arrange for people to tell the time throughout the world.

    Or we could just put on our big boy panties and learn how to program.

  • Hanzito (unregistered) in reply to Officer Johnny Holzkopf

    EU voters have already voted for DST to be abolished

    No, they haven't. There has not been a vote. There has been a voluntary, online survey, in which mainly Germans participated.

  • Bob Johnson (unregistered) in reply to LZ79LRU

    In case this wasn’t a joke, the length of a year varies, and measuring time itself is complex and subject to relativity. Case in point, It’s taking us until 2035 to phase out leap seconds. Both days and years are getting longer - albeit the rate of change is fairly small.

  • Foo AKA Fooo (unregistered) in reply to Officer Johnny Holzkopf

    TBH, I wouldn't mind to be warned one hour before an emergency.

  • see sharp (unregistered)

    Time zones (along with daylight savings adjustments) are useful if not essential for co-ordinating activities which happen on a daily cycle that respects daylight hours. For all other purposes, we have UTC, GPS time, and a few other measures. Consider that computers internally don't care what time of day it is, they just keep counting ticks from some epoch, and it's just convention that a computer tick is some defined fraction of a second which is a defined fraction of a standardized day. And, for what it's worth, an ISO second is a specific number of cycles of an atomic transition which just happens to approximate a specific division of a stamdard day.

  • (nodebb) in reply to OldCoder

    No they don't. They have similar but not identical ideas.

  • LZ79LRU (unregistered) in reply to Bob Johnson

    It was a joke, mostly. Buy I've decided to run with it. So feel free to run along.

    As I already explained, the day is a critical unit of time that needs to be maintained. We humans just work in terms of day/night cycles. So even if we were to build a space empire and abandon earth I'd expect we would keep 24h days when ever it was practical to do so.

    Years though not so much. A year is a very fudgable thing. If you look at the calendars of the world modern and historical you will find that they do not often agree on its length, start, end or even its connection to the solar cycle. Indeed, there is an entire category of calendars that are based off the lunar cycle instead.

    The only reason why we have globally settled on a solar calendar as the baseline standard is because of western imperialism and dominance. If China had become the worlds superpower as it might well have, we would be discussing how my ideas clash with the procession of the moon instead.

    This is because the year as a concept is not directly tied to celestial phenomena but to the procession of the seasons. And seasons had a huge impact on the daily life of premodern humanity. The celestial explanations are just an attempt to work backward from the seasons you see in order to better predict their arrival in the future. Which is why every culture out there had and many still have incompatible calendars that measure the year differently all to fit in their local needs.

    But that's than and this is now. And these days years, months and seasons are just a convenience for counting. If we were to declare day 0 tomorrow and abolish months and years entirely mankind wouldn't really loose anything of practical value. I am ignoring the adaptation period and pushback of course. But every software update does that.

    So if we are going to go boldly into the future we might want to consider decoupling the year from legacy requirements and invent a brave new counting system that works forever into the future as we did with everything else metric.

  • DrSproc (unregistered)

    Run every server on UTC and let the client's local settings determine local time from the client's point of view. Meaning each user must configure timezone and dst. Or your app needs to computer coordinates of longitude and latitude geography and know the local cuŕrent political timezone and DST. Good luck finding such a source of information.

  • (nodebb) in reply to LZ79LRU

    Everyone knows there are 365.2425 days in a year. Forcing it to 365 eliminates zero problems

  • (nodebb) in reply to jeremypnet

    The Earth's year is 365.2564 days.

    Your Earth maybe, on this one it is 365.2422 days.

    (Think about it - it has to be less than 365.25, that's why we skip the leap day in century years that are not divisible by 400 - getting us to 365.2425 which is only off by one day in 3,000 years or so)

  • LZ79LRU (unregistered) in reply to DJSpudplucker

    What problem did the ribbon in office solve?

    You will find most updates only exist to sell the new version and keep the developers employed. And to achieve that updates do not have to do anything actually worth while. They just have to be justifiable enough for who ever is arguing against you to give up in frustration.

    And what better to both ensure job security for future generations of chronological engineers and do so in a justifiable matter that than a completely new universal global calendar based around sound scientific principals such as round numbers.

    This one can at least be justified by the fact that through eliminating leap everything you simplify time calculation and tracking for both people and machines.

    Also, again, not everyone agrees on 365.something days. The Islamic Calendar for example has 355 days. The fact most westerners don't think about it does not change the fact we have a whole lot of competing standards for this.

    So creating a new universal standard for everyone would make things better.

    What more justification can you need? And if it can be justified it can be sold. And what can be sold will be done. We just need to convince who ever runs ISO to go along with it.

  • (nodebb) in reply to Science Gone Bad

    OK the mistake you made was trying to change the windows time to UTC. The correct approach is to use the API such as the one in .NET BCL to get UTC time.

    Secondly, I'm not sure what you mean by 12-20 ways to get the time. Windows is configured to sync with a source. That source can then be configured to an external source of your liking.

    Regarding the Hypervisor time issue, I can't comment because I typically use VMware (or more frequently, my clients do).

    Addendum 2023-09-15 14:16: PS. Your entire premise, though, is about Windows time being finicky and inability to set the Windows UI to UTC. I was commenting specifically about time zones.

  • (nodebb) in reply to LZ79LRU

    What problem did the ribbon in office solve?

    People were having trouble finding features, partly because the number of toolbars was multiplying. It was an information architecture problem and they fixed it with a reorg.

  • LZ79LRU (unregistered) in reply to jkshapiro

    People like you are the worst. Always ruining my beautiful arguments with your ugly truth.

    /joke

Leave a comment on “All the Time in the World”

Log In or post as a guest

Replying to comment #:

« Return to Article