Lurker News
After a frantic scramble this morning, our billing team has finished patching a bug which erroneously was charging our monthly subscribers for an extra day.

All test suites are passing now, and SRE has scheduled a postmortem after the QA confirms the fix in 2028.

Comments (481) 159 threads

Show all comments

Showing thread 10 of 159

dr_kiszonka5 replies#
One thing I have learned from HN is that datetime issues are hard, prolific, programming language agnostic, and not to trust myself to get the logic right. (The same applies to floats.)
submain2 replies#
just like you don't roll your own crypto, you don't roll your own date libraries.
epolanski1 reply#
Takes me less to launch some coin fork than getting even a single date time api correctly.
zormino#
The API is correct, you just called it at the wrong time
wut-wut#
Facts!
wruza#
Another thing programmers should know and fix is that most of it is self-inflicted. When there’s no easy way to add a day, people add 86400000 and stumble upon a leap second. When time is not needed, they use fixed hours and fail at timezones. And so on. Most date libraries provide mostly trivial and at the same time low-level use-cases, so people do all the stupid math with what essentially is an irregularly-based number.
alickz#
Datetime and phonenumbers are two subjects that are notorious for how complex they are despite seemingly simple everyday concepts
sensanaty#
I haven't had too many true hair-pulling moments in my life as a programmer, but the majority of them were because of datetime issues.

My brain just doesn't get the concept I guess, I always struggle a lot whenever I need to touch anything that does anything with dates/time