Answers for "time zones python"

5

datetime python timezone

import datetime
import pytz
my_date = datetime.datetime.now(pytz.timezone('US/Pacific'))
Posted by: Guest on June-18-2020
0

how to get the time zones in python

The most prevalent library for timezones in python is pytz, which can be installed by:

pip install pytz
It allows you to manipulate times by assigning times to timezones using Olsen timezones (e.g. Europe/London).
Posted by: Guest on July-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language