Example:
To translate a time instant from a
seconds since the epoch floating-point value into a time-tuple, pass the
floating-point value to a function (e.g. localtime) that returns a time-tuple
with all nine items valid:
#!/usr/bin/python
localtime = time.localtime(time.time())
print “Local current time :”, localtime
This will produce following result which could be formatted in any other
presentable form:
Local current time
: (2008, 5, 15, 12, 55, 32, 0,
136, 1)
No comments:
Post a Comment