Question about strftime

Paul Rubin http
Sat Feb 10 15:44:57 EST 2007


silverburgh.meryl at gmail.com writes:
> date = strftime("%Y%m%d_%H%M%S", gmtime())
> print date
> 
> I run the script at 2:18 pm, but I get this: 20070210_201837
> Can you please tell me why I get '20'? instead of '14' (which is 2:00
> pm)?

Wrong time zone?  Maybe you want localtime() instead of gmtime().



More information about the Python-list mailing list