The program is written in the Python programming language and uses the time module to work with dates and times. It calculates the current date and time in both GMT (Greenwich Mean Time) and the local time zone, and then prints the results. Here's a breakdown of the code:
The program can be used to display the current date and time in a specified format, which can be useful in various applications, such as event scheduling, project management, and more. The output of the program shows the current date and time in both GMT and the local time zone, which can be useful for comparing time in different locations.
from time import gmtime, strftime import time print("GMT : ",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"))
GMT : Sat, 24 Sep 2022 07:55:51 AM India Standard Time Local: Sat, 24 Sep 2022 01:25:51 PM India Standard Time
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions