Post #2239343
2025-01-18 16:01 UTC
Replies (7)
-
@bert_hubert@fosstodon.org 2025-01-18 16:47
Similarly, if your copy of the strptime() manpage left you with any hope on what it would do for you wrt timezones, I can highly recommend https://pubs.opengroup.org/onlinepubs/9799919799/functions/strptime.html "%z: The effect of this offset, if any, on the tm structure pointed to by tm is unspecified." %Z meanwhile is -somewhat- specified, but likely does not do what you'd think.
-
@revk@toot.me.uk 2025-01-18 16:02
@bert_hubert@fosstodon.org yeh, sorry, that I knew!
-
@fubaroque@mastodon.social 2025-01-18 16:53
@bert_hubert@fosstodon.org Sweet. Better wrap that straight away in something more sensible. 🥳
-
@raven667@hachyderm.io 2025-01-18 16:56
@bert_hubert@fosstodon.org Its this kind of shit I want to wave at people when they act like UNIX, C and the "old way" was some kind of perfection that should be worshiped, and that any *new* API or language design is unnecessary and perverts the "Unix Philosophy" rather than seeing Unix as a hacky work-in-progress, made by different people with very different preferences and ideas, that got solidified and standardized mid development with parts from divergent forks with different visions. This is an example of a half-baked API that works well enough, but I think most people would agree that returning -1 on error is not a sufficiently rich error path, a stopgap for simpler machines from a simpler era, and this kind of magic incantation needed to actually _use_ it is the kind of thing that very few people would intuit when using the API, so is probably a source of infrequent bugs due to "incorrect" usage.
-
@lmk@infosec.exchange 2025-01-18 17:21
@bert_hubert@fosstodon.org The phrasing of "wishing to check for error" is so nonchalant as if error checking was a whimsical curiosity. How many dependencies on this I wonder, and how many check for error?
-
@derryh@mastodon.scot 2025-01-18 17:40
@bert_hubert@fosstodon.org and, since the UK did not use GMT/UTC in either 1969, or 1970, that unexpectedly turns out to be almost an hour into 1970 if you have your time zone set to "Europe/London".
-
@alzimon@mastodon.nl 2025-01-19 16:12
@bert_hubert@fosstodon.org