[tz] strftime %s

Paul Gilmartin PaulGBoulder at AIM.com
Tue Jan 23 00:00:26 UTC 2024


On 1/22/24 14:24:41, Paul Eggert via tz 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.
>  .
Is there a format specification for printing such a type or must it first
be converted to long long by either cast or arithmetic?  I'm uneasy with
the idea of an integral type that can't be printed.  Is the format portable?

And what does time_t[] look like?  Might there be slack bits between
members of the array?

But this answers my long confusion about why localtime() requires a
reference, tine_t*, rather than merely a value.  There may be no way
to pass such an (opaque?) type on the stack.

-- 
gil



More information about the tz mailing list