This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, brian.curtin, ocean-city
Date 2010-12-08.19:45:36
SpamBayes Score 2.4354962e-12
Marked as misclassified No
Message-id <AANLkTi=18uW+7mDK+Q7+1iMMt8EW+AqLkHjRip+wCvUM@mail.gmail.com>
In-reply-to <1291834208.86.0.726523010069.issue10653@psf.upfronthosting.co.za>
Content
On Wed, Dec 8, 2010 at 1:50 PM, Hirokazu Yamamoto
<report@bugs.python.org> wrote:
..
> I got readable result. ;-)
>
You mean readable to *you*. :-)

>>>> import time
>>>> time.tzname
> ('東京 (標準時)', '東京 (標準時)')

This makes sense now.   There are two issues here:

1.  Decoding the output of wcsftime().  Python expects mbcs (which I
believe is an UTF16-like wide char encoding) while Windows apparently
puts cp932 there in your locale.  I don't have expertise to address
this issue.

2. strptime() cannot parse strftime() output when strftime('%Z') is
different from time.tzname[dst].  This issue we can address.  Note
that for most of the locale information such as day of the week or
month names, strptime() relies on strftime() output, so the
round-tripping should work even when strftime() results are
nonsensical.  On the other hand, tz spellings are taken from
time.tzname.    I think we can make strptime() more robust by adding
[time.strftime('%Z', (2000,1,1,0,0,0,0,0,dst) for dst in (0,1)] to the
list of recognized tz names if they differ from time.tzname.
History
Date User Action Args
2010-12-08 19:45:38belopolskysetrecipients: + belopolsky, ocean-city, brian.curtin
2010-12-08 19:45:36belopolskylinkissue10653 messages
2010-12-08 19:45:36belopolskycreate