Come passe fuso orario come argomenti in pitone

from datetime import datetime, timedelta
dt1 = datetime.strptime(17/02/2016 6:01:26 am(UTC-08:00), %d/%m/%Y %H:%M:%S %p(%Z%z))

> Traceback (most recent call last):   File <stdin>, line 1, in
> <module>   File C:\Python27\lib\, line 317, in _strptime
>     (bad_directive, format)) ValueError: 'z' is a bad directive in format '%d/%m/%Y %H:%M:%S %p(%Z%z)'

Come risolvere questo problema?

È pubblicato 02/03/2016 alle 18:38
In altre lingue...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more