Post #1380434
2026-04-19 04:02 UTC
Replies (13)
-
@Signez@mastodon.social 2026-04-19 07:54
@jdm_ @servo let's hope medecine and society improve enough that you'll be fixing this test happily in a century!
-
@hywan@floss.social 2026-04-19 08:14
@jdm_ @servo 100 years later: “100 years ago, someone updated a unit test for @servo that included a cookie…” 😁
-
@gsuberland@chaos.social 2026-04-19 09:33
@jdm_ @servo would it not make more sense to get the current year from the system time, add 10, and inject that, so it's robustly and permanently in the future?
-
@msmelo@bolha.one 2026-04-19 10:36
@jdm_ @servo let's make more 10 years :Capyblob_Peek:
-
@robinsyl@meow.social 2026-04-19 11:26
@jdm_ now I feel less stupid about having caused the same problem in my employer's codebase, but I solved it by making it always "current year + 10"
-
@betabug@mastodon.sdf.org 2026-04-19 11:55
@jdm_ @servo Been there, fixed that kind of tests ... multiple times. Also the ones that break only when the end of the month falls on a Friday. Or when the tests are run within 30min before midnight on a Tuesday. Or when the current week spans two months and the tests that checks "something this week" and "something next week" find a different month. Etc. etc.
-
@agturcz@circumstances.run 2026-04-19 14:02
@jdm_ @servo I have comments. No, wait, I have COMMENTS.
-
@cks@mastodon.social 2026-04-19 20:09
@jdm_ @whitequark Us, more than ten years ago: "We need a private TLS certificate authority root certificate for our VPN servers, surely the default lifetime of ten years is good enough." Us, ten years after generating the certificate: "Who could have possibly foreseen that a computer science department would still be here ten years later." (Okay, 'and using the same VPN systems'. Our new CA root certificates have a much longer lifetime, although not 100 years for TLS reasons.)
-
@jded@sky.c00lest-kats-on.ovh 2026-04-19 22:55
@jdm_@mastodon.social and thats why all my test stuff always expires at 9999
-
@valenting@fosstodon.org 2026-04-20 17:21
@jdm_ @servo if cookies are still a thing in 100 years then we have failed 🫠
-
@vriesk@hachyderm.io 2026-04-23 09:24
@jdm_ @servo Fun fact: I like to set some absurd dates in many unit tests, and then discover that the particular time library doesn't like them. Like, I want a geological eon (defined as minimum 500M years)! I want this to trigger when Butlerian Jihad starts! .. and then get a no, because a year can only have 4 decimal digits, or some amount of nano/microseconds 64-bit integer or whatnot overflows.
-
@ellis@transfem.social 2026-04-19 10:42
@jdm_@mastodon.social @servo@floss.social 100 years in the future sounds like a long time too. :neocat_laugh:
-
@mmu_man@m.g3l.org 2026-04-27 11:34
@jdm_ @servo well, the test worked I guess 😄