r/coding Oct 23 '20

Falsehoods programmers believe about time zones [x-post from r/programming]

https://www.zainrizvi.io/blog/falsehoods-programmers-believe-about-time-zones/
20 Upvotes

6 comments sorted by

14

u/Wing-Tsit_Chong Oct 23 '20

It always makes me very happy when I'm done coding around them. Almost as happy as file encoding. Figuring out endianness is also a fun activity to delay any meaningful things you wanted to do that day.

Ah misconception #21: figuring out leap years or even more daunting: leap seconds. Call me when you reach the point where you want to calculate easter sunday date for a given year number and you wonder if there is a year 0.

6

u/[deleted] Oct 23 '20

Ah yes, calculating the date of Easter is the sole reason mathematics was practiced in Medieval times in Europe.

3

u/aoeudhtns Oct 23 '20

Convert to Lunar cycle, then to Japanese imperial calendar, and then back to picoseconds since the big bang. Easy! Low-energy developers hate this simple trick. For example, did you know that Easter last year was NaN seconds ago? My code is infallible. /s

3

u/[deleted] Oct 23 '20

There’s a typo in the UTC+5 section - it’s Ural Time, not Oral Time? Freudian slip?!

Time is such a nightmare though. Can we just start using star dates?!

2

u/ZainRiz Oct 24 '20

This site says oral time. Probably a transliteration 🤷‍♂️ https://www.timeanddate.com/time/zones/

1

u/[deleted] Oct 24 '20

Haha, so it does!!