Pythom time technique localtime() is alike to gmtime() except it adapts number of seconds to restricted time. If secs is not offered or None, the present time as revisited by time() is utilized. The dst ensign is set to 1 when DST applies to the agreed time.
Following is the syntax for localtime() method:
time.localtime([ sec ])
This method does not return any value.
The following example shows the usage of localtime() method.
print "time.localtime() : %s" % time.localtime()
When we run above program, it produces following result:
time.localtime() : (2009, 2, 17, 17, 3, 38, 1, 48, 0)
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.