Python datetime timezone

In this Python datetime tutorial, you will learn about the Python datetime timezone.

# import datetime module
import datetime

# get current date and time
var_date =

# print the var_date
print("var_date =", var_date)

# print the type of var_date
print("type of var_date =", type(var_date))

# get timezone
var_timezone = var_date.tzinfo

# print the var_timezone
print("var_timezone =", var_timezone)

Free resources to learn advanced skills: AiHints and CodeAllow