Copyright © tutorialspoint.com
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'.
time.asctime([t])) |
Here is the detail of parameters:
A tuple of 9 elements or struct_time representing a time as returned by gmtime() or localtime() function.
This returns 24-character string of the following form: 'Tue Feb 17 23:21:05 2009'.
#!/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 |
Copyright © tutorialspoint.com