Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python time asctime() Function
Description:
This function converts a tuple or struct_time representing a time as returned by gmtime() or localtime() to a 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'.
Syntax:
Parameters:
Here is the detail of parameters:
Return Value:
This returns 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'.
Example:
#!/usr/bin/python
import time
t = time.localtime()
print "time.asctime(t): %s " % time.asctime(t)
|
This produces following result at my machine:
time.asctime(t): Tue Feb 17 09:42:58 2009
|
|
|
|