Better HN
topnewbestaskshowjobs
Log inSign up

skilpat

78 karma · joined May 26, 2019 (7y ago) · 10 submissions

Software Engineer in NYC. I write a blog about programming around -- and the history of -- dates, times, and time zones: https://typesandtimes.net
Submissions

comment 2y ago · link · parent

Kazakhstan's time zone unification yields an interesting quirk of time. But is it a unique quirk?

2.

Kazakhstan and the 25-Hour Leap Day(typesandtimes.net ↗)

2 points · by skilpat · 2y ago · 1 comment

3.

Twitter Poll: Which crappy datetime representation do you prefer? Election2020(twitter.com ↗)

1 points · by skilpat · 6y ago · discuss

4.

How to Periodize History: 2020 and the Decade Dilemma(typesandtimes.net ↗)

1 points · by skilpat · 6y ago · discuss

comment 7y ago · link · parent

I don't think the London historical offset should be blamed for such errors, nor should New York's nor any other zone's historical, local mean time offsets. If the tzdb is being used in a buggy way, that's on the user - in this case, pytz. Virtually all systems use tzdb in some form but don't blindly take the earliest historical offsets in a common usage pattern.

Fun fact: for many years the ECMAScript spec states explicitly that JavaScript implementations (i.e., a browser's implementation of JS) should use the wrong time zone information! Wrong in the sense of using an offset for _today_ rather than the offset that was applicable at the time of _the Date object_. Maybe they've changed that in recent years, I can't remember, but here's more info: https://codeofmatt.com/javascript-date-type-is-horribly-brok...

comment 7y ago · link · parent

Indeed! That library, as incorporated into the jdk, seems to me like the gold standard of datetime programming in standard libraries. Good type-level distinctions, good defaults, good extensibility... chef kissing fingers

comment 7y ago · link · parent

That's a pretty wild interpretation! I have nothing but respect for the tz db and its contributors; I indicated as much quite explicitly by stating my appreciation for the commentary. Personally I will soon be sending historical corrections to the precise days and times of DST changes in the 1940s for a few places in US and Canada, from my own research.

But yes, it's absolutely a tongue-in-cheek reference to the unrelated notion of "out-of-thin-air" values and reads in memory model semantics. (I've just added a link to an explanation by some PL researchers.)

comment 7y ago · link · parent

I've updated the post to clarify that one should not use `pytz` at all and should instead use `dateutil`. The latter has much more reasonable behavior and is more actively maintained. I also included a link to commentary about pytz by dateutil's current maintainer.

Why hasn't the bug been fixed? I'm not sure! But looking at the code it seems like this problem has existed for the past 9 years. My guess is that the developers and maintainers never saw it as an actual problem, despite its ubiquity.

9.

What the Royal Astronomical Society in 1884 Tells Us About Python Today(typesandtimes.net ↗)

142 points · by skilpat · 7y ago · 48 comments