From the official Ruby DateTime docs:
> If you also have to deal with timezones then best of luck - just bear in mind that you'll probably be dealing with local solar times, since it wasn't until the 19th century that the introduction of the railways necessitated the need for Standard Time and eventually timezones.
Friends don't let friends use time zones
There also appear to be.... no unit tests for timezones in Rubylang??? Am I reading this right? They haven't even been touched in ~3 years and most of them are placeholder
Wait I stand corrected! There are some tests, they are in Time and not DateTime. But also the ruby docs point out that there are actual differences between the two if you are calculating historical time
An … entertaining subject to say the least:
@RyunoKi I'm scared to read this https://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a-silver-bullet/
Do you have a concrete example that kicked this research of for you?
When you study Ruby's code, perhaps use git blame to check for last change and jump from the commit to a PR to gather more context. Might have a good reason why they didn't invest more effort into this part of the codebase.
@RyunoKi the history of basically all the tests are all clobbered by this commit -- it seems like they haven't really been touched in well over 5 years, I'd have to go back to some previous repository in order to find relevant commits
@darius @RyunoKi using NodaTime (the library used as a reference in this post) completely changed my perspective on working with datetimes and also now makes me very angry about every language's datetime stdlib which all seemed designed to maximize footguns.
The end result is programmers learn "datetimes are scary" instead of "this stdlib sucks"
Hometown is adapted from Mastodon, a decentralized social network with no ads, no corporate surveillance, and ethical design.