I think my code will be OK...
I think my code will be OK...
![](https://i.imgflip.com/87wum7.jpg?format=webp&thumbnail=128)
![](https://i.imgflip.com/87wum7.jpg?format=webp)
I know this isn't any kind of surprise, and yet, well...
I think my code will be OK...
I know this isn't any kind of surprise, and yet, well...
2100 and 2400 will be a shitshow
Not as much as 2038
Yeah that's a different shitshow but agreed it is likely to be worse - like y2k the effects are smeared out before and after the date.
2038 will certainly be a shit show
Yeah but I'll be dead so not my problem lmao
Nah.
Same thing happened in 2000 and it was a mouse’s fart.
Luckily, none of us will be there.
Why
Because they're not leap years but are 0 === year % 4
Won’t the computer’s clock reset every time you go to sleep and stop cranking the power generator?
Yeah who knows if our computers are sticks by either date
Then there's my code, which didn't even survive the time change.
In every project I've ever worked on, there's been somebody who must have been like, "HurDur Storing timestamps in UTC is for losers. Nyeaahh!"
And if I ever find that person, I'm going to get one of those foam pool noodles, and whack him/her over the head with it until I've successfully vented all my frustrations.
I just use a float between 0 and 1 with 0 being 1970 and 1 being the predicted heat death of the universe.
Your code made it to the time change!!?
Same... The change from 12 to 1
People who haven't had a birthday in almost four years are like
Programming aside, where I live in Southern Europe we have a tradition according to which leap years bring bad luck. After 2020, I don't know what to expect... nuclear apocalypse maybe?
Wait, 2020 wasn't a bad luck year?
Previous commenter meant "what could be worse than the bad luck leap year 2020?"
Always, always, always, without taking any shortcuts, use a tzinfo library for your language.
Anyone who doesn't use standardized libraries for tz should be summarily tried.
I'm not worried about my code, I'm (very slightly) worried about all the date libraries I used because I didn't want code that shit again for the billionth time.
Your comment made me go look at the source for moment.js. It has "leap" 13 times and the code looks correct. I assume they test stuff like this.
I worked in broadcasting (programming broadcasting applications), everything is done with PTP (Precise Time Protocol) and TC (timecode) in video. We had to support leap second, it's not as easy, but in the end, insert black frames for 1s and that's it.
I hope leap days are handled a bit more sophisticated!
Insert black frames for 24 hours and you're good to go!
Haha yes, no problem with those 😁
Yeah... I patched some unit tests...
Before it was 50/50 that they'd fail on leap day, but after the patch it's 50/50.
I'm not worried at all - I love me some tz database.
I hope the homeassistant guys already have this covered, because I didn't use it 4 years ago to know
We found an use case with Page duty and it's ical feed already...