
bert hubert 🇺🇦🇪🇺 on Nostr: I have finally found an up to date standard that covers mktime(), - and in it we ...
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.
