PyDocs

Nav

Internet Data Handling

formatdate

email.utils

function (source)
  • formatdate(timeval=None, localtime=False, usegmt=False)
Returns a date string as specified by RFC 2822, e.g.:

Fri, 09 Nov 2001 01:08:47 -0000

Optional timeval if given is a floating-point time value as accepted by
gmtime() and localtime(), otherwise the current time is used.

Optional localtime is a flag that when True, interprets timeval, and
returns a date relative to the local timezone instead of UTC, properly
taking daylight savings time into account.

Optional argument usegmt means that the timezone is written out as
an ascii string, not numeric one (so "GMT" instead of "+0000"). This
is needed for HTTP, and is only used when localtime==False.
0 Examples
No examples for email.utils/formatdate.
See Also
No see-alsos for email.utils/formatdate
0 Notes
No notes for formatdate