Python Programming - Standard Libraries - Discussion

Discussion Forum : Standard Libraries - General Questions (Q.No. 76)
76.
What does the zoneinfo module in Python provide support for?
Handling time zones and daylight saving time
Generating random numbers
Sorting elements in a list
Parsing JSON data
Answer: Option
Explanation:
from datetime import datetime
from zoneinfo import ZoneInfo

# Example usage of zoneinfo module for handling time zones
dt = datetime(2022, 1, 1, tzinfo=ZoneInfo("America/New_York"))
print(dt)
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.