YouTip LogoYouTip

Att Time Asctime

# Python2.x Python time asctime() Method * * * ## Description The Python time asctime() function accepts a time tuple and returns a readable 24-character string in the form "Tue Dec 11 18:07:14 2008" (Tuesday, December 11, 18:07:14, 2008). ## Syntax The syntax for the asctime() method is: time.asctime() ## Parameters * t -- A 9-element tuple or a time value returned by the gmtime() or localtime() function. ## Return Value Returns a readable 24-character string in the form "Tue Dec 11 18:07:14 2008" (Tuesday, December 11, 18:07:14, 2008). ## Example The following example demonstrates the usage of the asctime() function: #!/usr/bin/pythonimport time t = time.localtime()print "time.asctime(t): %s " % time.asctime(t) The output of the above example is: time.asctime(t): Tue Feb 17 09:42:58 2009
← Att Time ClockAtt Time Altzone β†’