Ben Finney wrote:
>Tim Roberts 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
You might consider trying dateutil.parser.parse
(http://labix.org/python-dateutil#head-c0e81a473b647dfa787dc11e8c69557ec2c3ecd2)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks,
My script should be platform independent, so I think filtering out time zone
info is better.
--
http://mail.python.org/mailman/listinfo/python-list
Tim Roberts 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 know
Junaid P V wrote:
>
>I was trying to parse a date string containing "EDT" time zone
>
>eg: 'Mon Jun 20 14:00:57 EDT 2011'
>
>I tried:
>
>datetime.strptime('Mon Jun 20 14:00:57 EDT 2011', '%a %b %d %H:%M:%S %Z %Y')
>
>But I get error
Right, because strptime doesn't support %Z. You'll have to hand
Junaid P V writes:
> I tried:
>
> datetime.strptime('Mon Jun 20 14:00:57 EDT 2011', '%a %b %d %H:%M:%S %Z %Y')
>
> But I get error
When reporting that you get an error, please give the full error and
traceback.
My mind reading skills are telling me, though, that you're getting a
ValueError bec
I was trying to parse a date string containing "EDT" time zone
eg: 'Mon Jun 20 14:00:57 EDT 2011'
I tried:
datetime.strptime('Mon Jun 20 14:00:57 EDT 2011', '%a %b %d %H:%M:%S %Z %Y')
But I get error
--
http://mail.python.org/mailman/listinfo/python-list