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

Earlier comments
pastureofplenty1 reply#
Yes, I have a bot that posts daily San Francisco weather records to Mastodon. It did not post as scheduled today. This is because I am looking at all the high temperatures, low temperatures, and precipitation on today's date from 1875 (about as far back as there are digitized weather records I can work with) to the present. Since there was no such date as February 29, 1875 it is throwing an error.
netcraft2 replies#
I just dont get the “daily” weather records thing. Meteorologists talk about them constantly but theyre completely meaningless right? who cares what this particular day of the year highs were? its just noise! at least do it on a weekly resolution instead but even that seems so noisy itd be meaningless.

sorry, this has nothing to do with you, just a pet peeve.

jrockway1 reply#
People like them because they happen more often. "This is the hottest February 29th on record!" but it's not the hottest February 28th or March 1st.

Compare that to something more mathematically rigorous: "Today is warmer than 98.72% of days between February 25th and March 5th". Nobody's going to click that link.

DANmode#
Your words read like you're disagreeing,

but the idea seems like it's agreeing.

jasomill#
As weather conditions are roughly cyclical with a period of a year, this doesn't strike me as a particularly unusual thing for a weatherperson to mention in passing.

Though you're correct in that year-over-year weather changes and daily maxima lack the significance of long-term climate trends.

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

_xnmw#
Surprised no one else mentioned the Cloudflare billing issue today. I got incorrectly invoiced yesterday and the file was named cloudflare-invoice-1970-01-01.

https://www.cloudflarestatus.com/

hannob1 reply#
I know I'm late to the party, but I have a Python script that creates a security.txt for one of my own project, and it sets the "Expires" date to one year in the future.

Old code:
expires = datetime.datetime.now(tz)
expires = expires.replace(year=expires.year + 1)
It broke yesterday, throws an exception ("ValueError: day is out of range for month"). It's kinda obvious that it does.
Fixed version code:
expires = datetime.datetime.now(tz) + datetime.timedelta(days=365)
expires = expires.isoformat(timespec="seconds")
Now we're just going 365 days into the future. Of course, this has a slightly different meaning and outcome, we are not always ending up on the "same date next year". But in this use case it doesn't really matter.

willsmith721 reply#
There's the same in python, but if you wanna write shitty code you can always get around it
wwilim#
Is it just me or does .NET have the most sane standard library for dealing with dates? Until you get into timezones that is

Load more comments