Вопрос

So far I have:

>>> import time
>>> time.strftime("%a, %d %b %Y %H:%M:%S %Z", time.localtime())
'Tue, 10 Sep 2013 22:55:08 Mitteleurop\xe4ische Sommerzeit'

But what I need is:

'Tue, 10 Sep 2013 22:55:08 GMT'
Это было полезно?

Решение

>>> import time
>>> time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())
'Tue, 10 Sep 2013 20:08:51 GMT
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top