programming-examples/python/Date/Get the GMT and local current time.py
2019-11-15 12:59:38 +01:00

4 lines
191 B
Python

from time import gmtime, strftime
import time
print("\nGMT: "+time.strftime("%a, %d %b %Y %I:%M:%S %p %Z", time.gmtime()))
print("Local: "+strftime("%a, %d %b %Y %I:%M:%S %p %Z\n"))