different time tuple format

Maksim Kasimov kasimov at i.com.ua
Tue Jun 7 21:13:52 CEST 2005


Rick Holbert wrote:
> Like the last poster said, use %Z.  On my Mandriva Linux system I get the
> following results:
> 
> 
>>>>time.localtime()
> 
> (2005, 6, 7, 15, 7, 12, 1, 158, 1)
> 
>>>>time.strptime("2005-06-07 15:07:12 EDT", "%Y-%m-%d %H:%M:%S %Z")
 > (2005, 6, 7, 15, 7, 12, 1, 158, 1)

does not work at all: "ValueError: format mismatch"

i've check the value of time.tzname:
('EET', 'EEST')

and get the following (again):

 >>> time.strptime("2005-06-07 15:07:12 EET", "%Y-%m-%d %H:%M:%S %Z")
(2005, 6, 7, 15, 7, 12, 6, 1, 0)









-- 
Best regards,
Maksim Kasimov
mailto: kasimov at i.com.ua



More information about the Python-list mailing list