Getting current Time -:

Mohit Sethi
Appliedcode
Published in
1 min readJul 21, 2012

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)

--

--

Mohit Sethi
Appliedcode

OpenSource | DevSecOps | DataScience | Machine Learning | ChatBots | Robotic Process Automation(RPA) | Coffee lover | Codes for a better world | Opinions = Mine