parse date string having "EDT"

Tim Roberts timr at probo.com
Wed Jun 22 23:55:27 EDT 2011


Ben Finney <ben+python at benfinney.id.au> wrote:

>Tim Roberts <timr at probo.com> writes:
>
>> Right, because strptime doesn't support %Z.
>
>Au contraire:
>
>    Support for the %Z directive is based on the values contained in
>    tzname and whether daylight is true. Because of this, it is
>    platform-specific except for recognizing UTC and GMT which are
>    always known (and are considered to be non-daylight savings timezones).

I do keep forgetting that Python's strptime does not just pass through to
the C library.  C's strptime does not support %Z.
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list