[Toybox] date with timezone

Rob Landley rob at landley.net
Fri May 28 02:06:04 PDT 2021


On 5/26/21 11:17 AM, Frank Liu wrote:
> A bit background, the TZ string actually came from the "stat":

I'm fine with it, I've seen that in mbox files and so on too.

The question I have is how I feed the information to the libc functions. Since
setting TZ to "+1234" didn't work (nor did setting it to just 1234), I'm
guessing I need to parse the data and assign it to "timezone" myself? Except
doing so appears to be ignored in glibc. From a quick glace at the musl source
it looks like it might work there?

(Also, why is timezone a long? 2 billion seconds is 60 years. Number of seconds
to offset time from UTC within the day does not seem like it would need to be a
64 bit number...)

Rob



More information about the Toybox mailing list