Getting formatted time -:

Mohit Sethi
Appliedcode
Published in
1 min readJul 21, 2012

Example:

You can format any time as per your requirement, but simple method to get time in readable format is asctime() :

#!/usr/bin/python

Import time;

localtime = time.asctime ( time.localtime(time.time())

print “Local current time :”, localtime

This would produce following result:

Local current time: Tue Jan 13 10:17:09 2009

--

--

Mohit Sethi
Appliedcode

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