What is Nostr?
bert hubert 🇺🇦🇪🇺 /
npub1k2n…u4xq
2025-01-18 16:01:32

bert hubert 🇺🇦🇪🇺 on Nostr: I have finally found an up to date standard that covers mktime(), ...

I have finally found an up to date standard that covers mktime(), https://pubs.opengroup.org/onlinepubs/9799919799/functions/mktime.html - and in it we learn that on error mktime returns the valid timestamp -1 (which happened in 1969 UTC). To detect if this was an actual error, callers must set tm.tm_wday to -1, and check if after a call it is still -1. In that case, an error happened.

Author Public Key
npub1k2njntmj75l277nyj39rkn7vrfwyu3rks54cq5fm7sz3s0zggxrsseu4xq