Live data from Hacker News

UTC Is Enough for Everyone, Right?

zachholman.com

61–70 of 321 posts

Re: UTC Is Enough for Everyone, Right?

#61

> Properly storing timezone-aware times I'd just like to point out that a lot of RDBMSs support storing date and time alongside timezone information directly without using two separate fields. SQL Server has datetimeoffset, PostgreSQL has timestamp with time zone, and Oracle has timestamp with time zone. I think MySQL does as well, but I seem to recall something strange about it. Or maybe that's just me expecting MyS…

> time with timezone without a date attached to it is inherently ambiguous

I'd view that as incomplete (rather than ambiguous) until applied to a specific date. "You people in the Hawaii office feel free to join the Boston 2PM call whenever you want" is a fine thing to say even though you don't know what the Hawaii time will be until you know the date.

Re: UTC Is Enough for Everyone, Right?

#62
post #33

So the article seems to imply you should store all timestamps as UTC (with an additional timezone string ID). But for events in the future that needs to happen on a specific "wall clock point in time", it might be better to actually store the yyyy-mm-dd hh:mm:ss as a string with a timezone next to it, because timezones can and do change often unpredictably. If you pre-calculate what "4.00pm next August 1st" is as a U…

Yes, you have to periodically recompute times.

For example, if you store time in TAI then you'll have to recompute all other future times as leap seconds are announced.

Re: UTC Is Enough for Everyone, Right?

#64
post #37
post #32

Earlier quoted context omitted.

Software is built for humans to use in the real world. While reshaping the entire world might make the code simpler, it's not a practical solution.

Indeed it simplifies software, but it also makes life much easier for humans trying to coordinate communication across timezones. There's probably some research somewhere estimating the cost to business (or loss of revenue) from mistakes in doing timezone conversions. In the simplest case, if you have a business call with someone halfway around the world, and one of you has recently gone into or out of daylight savin…

I have given up trying to calculate these things, so just use the meeting planner on TimeAndDate.com[0] ...

[0]: https://www.timeanddate.com/worldclock/meeting.html

Re: UTC Is Enough for Everyone, Right?

#66
post #60

Earlier quoted context omitted.

> I'd just like to point out that a lot of RDBMSs support storing date and time alongside timezone information directly without using two separate fields. SQL Server has datetimeoffset, PostgreSQL has timestamp with time zone, and Oracle has timestamp with time zone. PostgreSQL's "timestamp with time zone" doesn't store timezone, it converts the time to UTC and stores that, and on retrieval converts the value to the…

That sounds dumb (if column type is called like that text in the quotes)

It is, and it is.

Re: UTC Is Enough for Everyone, Right?

#67
post #46

I have been thinking a lot lately that we are trying to solve class of XY Problem. Universal time is in part about trying to order events in a strict order. Probelm is, nobody observed that order. Later we infer things about the system based on this chronology but it’s completely fictitious and we have to stretch our brains to explain the state of the system. The Java Memory Model, and subsequently several other lang…

If people could regularly reason like that, asynchronous programming wouldn't be such a pain in the ass.

My knee jerk response is “Events in a git repository are partially ordered. And we have a visualization for that.” And then I recall how often people misunderstand a git diagram with more than three independent chains of events.

Still doesn’t rule out bad tools but it doesn’t paint a good prognosis.

Re: UTC Is Enough for Everyone, Right?

#68
post #48

Earlier quoted context omitted.

https://developers.google.com/time/smear

We don't need more standards. We have UTC and TAI. Pick one, use that one.

Leap smearing isn't related to TAI, it's just a way to minimize the effect of leap seconds on machines using NTP servers.

Re: UTC Is Enough for Everyone, Right?

#70
post #2

The author expected this comment, but i'd still like to note that this website saturates at least one core of my laptop, more depending where I scroll.

What browser is that? In Safari it seems to use negligible CPU when just text is on the screen, which goes up to maybe 20% of one core if one of the big videos is visible. It's also not enough to get the CPU to raise it's frequency/power consumption out of the idle state it is on, say, hacker news.
Post reply on HN