[Datetime-SIG] Add a strftime/strptime code for timezone ID

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Nov 3 10:20:40 EDT 2016


On Thu, Nov 3, 2016 at 12:38 AM, Random832 <random832 at fastmail.com> wrote:

> On the IANA side of things, the tzid is not intended to be displayed as
> a human-readable way to identify the timezone (and this is used to
> rebuff demands by users to create tzids for cities like Brasilia and
> Beijing that people want to see represented over Sao Paulo and Shanghai)
>
> What is the reason for wanting this?
>

My proposal was indeed prompted by the recent discussion on the IANA
mailing list about human readable abbreviations being changed to numeric
codes.  It is not uncommon for people to display timezones with '%Z %z'
format which with recent changes would result in "+10 +1000" for say
Asia/Vladivostok.  With the proposed %/ code, "%/ %z" would print
"Asia/Vladivostok +1000" which looks like an improvement even over the
original "VLAT +1000".

The results of strftime() are not necessarily intended for displaying
directly to end users.  An application can have an extra layer that
translates tzids for display and the raw tzids may be useful for saving
times in text files or a database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20161103/af014757/attachment.html>


More information about the Datetime-SIG mailing list