getting date into rfc822 format
Erik Max Francis
max at alcyone.com
Sun Jul 21 00:43:19 EDT 2002
"Jon J. Morin" wrote:
> date = time.ctime(time.time())
>
> Which gives me a date like this:
> Sat Jul 20 00:02:03 2002
>
> When what I want is something like this:
> Fri, 01 Mar 2002 00:18:17 -0500 (EST)
Try time.strftime, though you might have to hack up the timezone
information yourself.
http://www.python.org/doc/current/lib/module-time.html
> Incidentally, I have read the rfc822 and I can't figure out what the
> -0500
> is in the date/time. Can anyone explain this to me?
It's the timezone.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ See the son in your bad day / Smell the flowers in the valley
\__/ Chante Moore
Bosskey.net: Aliens vs. Predator 2 / http://www.bosskey.net/avp2/
A personal guide to Aliens vs. Predator 2.
More information about the Python-list
mailing list