Live data from Hacker News

Timezone Bullshit

blog.wesleyac.com

201–210 of 334 posts

Re: Timezone Bullshit

#201
post #86

Earlier quoted context omitted.

[Some links that I've posted the last few times DST has come up:] The folks who study this: * https://en.wikipedia.org/wiki/Chronobiology Seem to have come to a consensus that if we're going to get rid of DST, then health-wise it is best to have Standard Time year-round: > As an international organization of scientists dedicated to studying circadian and other biological rhythms, the Society for Research on Biologica…

The sun rises in Singapore between 0655 and 0715 depending on the time of the year. How would changing the clock help at all?

It wouldn't, as it gets ~12 hours at both solstices:

* https://www.timeanddate.com/sun/singapore/singapore

DST is mostly for countries closer to the poles. See my other comment:

* https://news.ycombinator.com/item?id=26088383

Re: Timezone Bullshit

#202

Earlier quoted context omitted.

> or fail noisily if it's not aware of that offset code. But it is aware of it! You just told it, using the TZ variable, what EDT is. It's a timezone called EDT, with no offset from UTC! If you wanted an offset, you should have written `TZ=EDT+4 date`

why doesn't this work the same way for 'EST' then? You don't specify offset so it should just display in UTC as well, right?

Because it has additional information in a file in `/usr/share/zoneinfo`.

But you can still define a brand new timezone with the TZ variable. Perhaps you want to argue that you shouldn't be able to, but that's what it's for, as the document linked above clearly states.

Re: Timezone Bullshit

#203
On macOS (Catalina-10.15.7), it looks like it is fixed or uses an updated version of the libc library mentioned in the article

Expected:

$ TZ=LOL_THIS_DOESNT_EXIST date Sat 10 Jul 2021 12:00:00 AM LOL

Actual:

$ TZ=LOL_THIS_DOESNT_EXIST date Wed Feb 10 17:02:02 UTC 2021

Otherwise I agree with the article. Have told so many co-workers that storing your dates in anything other than UTC will bite you in the ass later on. Converting it to the relevant time zone for display purposes is a trivial operation.

Re: Timezone Bullshit

#204

Earlier quoted context omitted.

> or fail noisily if it's not aware of that offset code. But it is aware of it! You just told it, using the TZ variable, what EDT is. It's a timezone called EDT, with no offset from UTC! If you wanted an offset, you should have written `TZ=EDT+4 date`

If I'm understanding the examples, it looks like (in general) commands such as `TZ=EST date` work as expected (i.e. you can set offset just using the offset code). > But it is aware of it! You just told it The user didn't intend to. Defining a new offset code should be explicit, not a silent fall-back when it's unable to find EDT.

> The user didn't intend to.

Well, they should have read the docs. They clearly show examples of how to define a timezone right there. It isn't a fallback, it's what TZ is for.

Edit: perhaps `date` should have a `-z --zoneinfo` option, in which you could specify a timezone by file and it would fail if the file did not exist. This would fix the issue and avoid breaking existing scripts.

Re: Timezone Bullshit

#205
Another mistake I’ve seen is using one timezone code used interchangeably with others in the “same” timezone. This is bad because different locales have different DST rules, and because they have different governing authorities which can and do change the rules.

And another still: assuming that all of a state uses the same TZ. Quite a few do not! Arizona for instance has several tribal timezones which honor DST while the state does not. Nevada has a little sliver of mountain time. Michigan has four counties in central time. And so on.

This stuff is hard to get right. And it’s important. “Just use UTC” is often the naive solution but it’s not good enough for a variety of use cases.

Re: Timezone Bullshit

#206

Earlier quoted context omitted.

What if you're scheduling a meeting for multiple people, and normally you're in Seattle, but for some of these meetings you'll be in New York? You don't want the meeting to be at 8:00 your time because chances are the people in Seattle aren't going to join your call at 5:00 their time.

As someone who routinely sets meetings for people in multiple timezones, let me say this isn't confusing. All the calendaring tools I use or am aware of, at this point, keep up with time zone correctly (or have so far). I set the meeting for, say, 10 CST, and it's clear to my colleagues in Seattle that it will be 8 for them, just as it's clear for my coworkers in DC that it'll be 11.

There are still edge cases.

What if you schedule a meeting in a year's time in a timezone that doesn't have Daylight Savings Time but that government decides to add it and now the meeting is at a time that doesn't exist?

But your use case it also talking about when using a tool that is specifically designed to deal with this issue. What about when you are trying to find a good time (AFAIK most calendars don't have good tooling for collaboratively choosing a meeting time). If you do this in your favourite chat app then you probably have no timezone support. (This would be an awesome feature though)

Re: Timezone Bullshit

#207

Earlier quoted context omitted.

A good portion of the EU is in CET when they probably shouldn't be when it comes to solar time: * https://en.wikipedia.org/wiki/Time_in_Europe France should probably, AFAICT, be in WET (like the UK) and Spain definitely should be. Solar time offsets are quite off for them: * http://blog.poormansmath.net/how-much-is-time-wrong-around-t... * https://github.com/stefano-maggiolo/solar-time-vs-standard-t... * https://24ti…

I hope that we can stop trying to sync noon to the local sun at some point. I think it made sense when communicating over distances was hard and rare. In that case giving local time some meaning (ex: "People tend to wake up around 8") had some value. However now that communicating with people around the word is commonplace I think that benefit is outweighed by the value of knowing what time people are talking about.…

> I hope that we can stop trying to sync noon to the local sun at some point.

Humans have circadian rhythms that have health effects:

* https://en.wikipedia.org/wiki/Chronobiology

See my comment linking to various position papers of the scientists who study in this field:

* https://news.ycombinator.com/item?id=26088541

They generally want to get rid of DST completely and stick with Standard ("winter") Time all year round. (I don't know enough to gainsay them.)

Re: Timezone Bullshit

#209

Earlier quoted context omitted.

The closer one is to the poles, the more the number of hours of daylight shifts over the seasons. So at/near the equator, in a place like Panama, you will get roughly 12 hours of daylight in both the December and June Solstices. * https://www.timeanddate.com/sun/panama/panama Whereas in the Edinburgh you go from having 7 hours of daylight in December to over 17 hours in June: * https://www.timeanddate.com/sun/uk/edin…

The worst thing is that the farther north you go, the less it matters. In Ireland, DST only really makes a difference for a month or so around the change. In the summer, light. In the winter, dark.

[deleted]

Re: Timezone Bullshit

#210

Earlier quoted context omitted.

I hope that we can stop trying to sync noon to the local sun at some point. I think it made sense when communicating over distances was hard and rare. In that case giving local time some meaning (ex: "People tend to wake up around 8") had some value. However now that communicating with people around the word is commonplace I think that benefit is outweighed by the value of knowing what time people are talking about.…

> I hope that we can stop trying to sync noon to the local sun at some point. Humans have circadian rhythms that have health effects: * https://en.wikipedia.org/wiki/Chronobiology See my comment linking to various position papers of the scientists who study in this field: * https://news.ycombinator.com/item?id=26088541 They generally want to get rid of DST completely and stick with Standard ("winter") Time all year r…

I'm not saying that we shouldn't sync our schedules to the sun, I'm saying that we should sync time to the sun.

So in Toronto I can wake up at 12:00 and in London people can wake up at 8:00. It just changes the number on the clock.

Post reply on HN