[tz] localized date without time

Paul Eggert eggert at cs.ucla.edu
Thu Aug 1 01:49:44 UTC 2024


On 2024-07-30 23:04, Alejandro Colomar wrote:

> it might be better to show the timezone information together with
> the date, to be clear that what we're printing is local time.

That would make sense, given that this is a change to behavior and the 
time zone info will let people know of the change.


> maybe it's understood that when printing a
> date some timezone information is implicitly local?

It's not obvious to everybody.


> I don't see any way to print something like 2023-09-21+02:00 in
> standardese.  Is this a defect in ISO 8691?

Sort of, yes. You can use a format like "2023-09-20T00:000-07:00" to 
follow the letter of the standard. I would suggest, though, using the 
format "2023-09-20 -0700"; this uses an RFC 3339 / ISO 8601 date, space, 
and time-zone, and this notation would be more useful to human readers 
even if it's not specifically called out in the standards.

If you wanted to get fancy you could append an RFC 9557 suffix but 
that's surely overkill for this application.


More information about the tz mailing list