Printable time
Alex Martelli
aleaxit at yahoo.com
Mon Dec 4 10:43:45 EST 2000
"Dale Strickland-Clark" <dale at out-think.NOSPAMco.uk> wrote in message
news:7m9n2tcp5ff10o97sr1d57qokakjqsa2m9 at 4ax.com...
> Is there a more succinct way of getting the current local time as text
than:
>
> time.strftime('<format>', time.localtime(time.time()))
time.ctime(time.time())
will do, but you get no control over the format -- you do need strftime
if applying a format of your choosing is important, I think.
Alex
More information about the Python-list
mailing list