Code: Select all
def display_time():
# Collect current time and date
if(time_format):
current_time = time.strftime("%I:%M")
else:
current_time = time.strftime("%H:%M")
Code: Select all
def display_time():
# Collect current time and date
if(time_format):
current_time = time.strftime("%I:%M")
else:
current_time = time.strftime("%H:%M")
Code: Select all
from time import gmtime, localtime, strftime
utc = strftime("%a, %d %b %Y %H:%M:%S %Z", gmtime())
local = strftime("%a, %d %b %Y %H:%M:%S %Z", localtime())
print local, utc