Created
February 22, 2022 12:19
-
-
Save mrtushartiwari/add39956144e402a8c29983f55329a40 to your computer and use it in GitHub Desktop.
time_in_india_datetime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import pytz | |
time_now_zone = datetime.datetime.now(pytz.timezone("Asia/Kolkata")) | |
print("Current Time in the country 'India' is : ", time_now_zone.strftime("%H:%M:%S")) | |
print("Set Timezone : ", time_now_zone.tzinfo) | |
print(datetime.datetime.now().strftime("%H:%M:%S")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment