[tz] strftime %s
Matthew Donadio
matt at mxd120.com
Mon Jan 22 23:01:03 UTC 2024
On Mon, Jan 22, 2024 at 4:24 PM Paul Eggert via tz <tz at iana.org> wrote:
> POSIX doesn't require int64_t. This is true even of POSIX 202x/D4.
>
> And even if POSIX required int64_t, it wouldn't need to require time_t
> to be 64 bits. It could allow 60-bit time_t on implementations that have
> 60-bit integer types, much as it already allows 60-bit implementations
> of types like off_t and size_t.
>
> This is all hypothetical of course. ...
Forgive me if I am getting standards / versions mixed up, but doesn't POSIX
require CHAR_BIT==8? And recent POSIX says time_t is an integral type
(compared to an arithmetic type)? Wouldn't this mean that time_t has to at
least be a multiple of 8-bit in size now?
And for historical purposes, weird non-POSIX platforms with C compilers
have long life in the DSP and micro-controller world. I worked on a
system into the early 2000's that had CHAR_BIT==32, and sizeof() all types
was 1 as a result (along with 40-bit non-IEEE floating point). It also
wouldn't surprise me if there is a VAX somewhere that won't die, and
someone still is dealing with the MJD epoch and 100ns ticks.
--Matthew Donadio (matt at mxd120.com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20240122/14393e82/attachment.htm>
More information about the tz
mailing list