Post AJHteLkcUIu8uzVvDU by mhoye@mastodon.social
(DIR) More posts by mhoye@mastodon.social
(DIR) Post #AJHqp8pIa72i9l9lqa by darius@friend.camp
2022-05-09T20:32:07Z
1 likes, 0 repeats
I had to think about a time zone parsing problem for 5 minutes at work and my body was immediately overwhelmed by the need to sleep for an hour.
(DIR) Post #AJHteLGUIKnlPXPrFY by Chronotope@indieweb.social
2022-05-09T20:33:10Z
0 likes, 0 repeats
@darius It truly is the worst.
(DIR) Post #AJHteLkcUIu8uzVvDU by mhoye@mastodon.social
2022-05-09T20:44:55Z
1 likes, 0 repeats
@Chronotope @darius Told a class once, there are some classes of software problem where you only have two choices; you dedicate your life to them, or you exclusively use tools made by people who have dedicated their lives to to them. Every other option is a road to madness and agony.
(DIR) Post #AJHteNBb9U4xMx8yuG by mhoye@mastodon.social
2022-05-09T20:55:34Z
0 likes, 0 repeats
@Chronotope @darius If you choose to pursue that path - timezones and cryptography for example - you will have a long, rewarding career ahead of you, and outside of a small cadre of your fellow developers, nobody will ever know who you are, or how much the world owes you.
(DIR) Post #AJHwFBpMXtt0lQQW4O by oldbooksmell@weirder.earth
2022-05-09T20:33:44Z
0 likes, 0 repeats
@darius time zones. Not even once
(DIR) Post #AJHwFCRIGsEAf4AoC0 by darius@friend.camp
2022-05-09T20:34:35Z
0 likes, 0 repeats
@oldbooksmell my proposal is that we simply stop trying to coordinate things
(DIR) Post #AJHwFCmYznF1j27nLU by shadowfacts@social.shadowfacts.net
2022-05-09T21:35:22.210664Z
0 likes, 0 repeats
@darius @oldbooksmell my proposal is we have a continuous gradation of timezones around the world, in one minute increments from one side of the intl date line to the otherit may take a few excruciating months, but ultimately the population will overwhelmingly support one global timezone
(DIR) Post #AJLoVOQVRrAHTIr5mq by darius@friend.camp
2022-05-11T17:31:56Z
0 likes, 0 repeats
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
(DIR) Post #AJLoVOqjsK9Gmf82fw by darius@friend.camp
2022-05-11T17:40:21Z
1 likes, 0 repeats
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 placeholderhttps://github.com/ruby/ruby/tree/master/spec/ruby/library/datetime
(DIR) Post #AJLoVPIODWGaAQ47m4 by darius@friend.camp
2022-05-11T17:42:18Z
0 likes, 0 repeats
There are handful that are for timezone offsets, but for example, DateTime.parse is not tested for things like "PDT" or "GMT" in a string
(DIR) Post #AJLoVPqQAzULrxzIoq by darius@friend.camp
2022-05-11T17:43:08Z
0 likes, 0 repeats
Normally I'm not a stickler for 100% test coverage but...... this is a stdlib in Ruby? The programming language?
(DIR) Post #AJLoVQRHxuyliJEkHg by darius@friend.camp
2022-05-11T17:46:29Z
0 likes, 0 repeats
Oh well, another day, another data point in favor of "the fact that computers run at all is a miracle"
(DIR) Post #AJLoVR2riD2Laqokr2 by darius@friend.camp
2022-05-11T17:49:19Z
0 likes, 0 repeats
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 timehttps://github.com/ruby/ruby/blob/d92f09a5eea009fa28cd046e9d0eb698e3d94c5c/spec/ruby/library/time/shared/rfc2822.rb
(DIR) Post #AJLoVRruePs09AhWQC by darius@friend.camp
2022-05-11T17:50:09Z
0 likes, 0 repeats
So I guess the most correct thing to say is that there is no test coverage for historical time in Ruby (this matters because time zones change over time so if you are trying to make accurate comparison across years and especially decades this will come into play)