How can I display the current time as:
12:18PM EST on Oct 18, 2010
in Python. Thanks.
How can I display the current time as:
12:18PM EST on Oct 18, 2010
in Python. Thanks.
By using this code, you'll get your live time zone.
import datetime
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))