Top "Pytz" questions

pytz brings the Olson tz database into Python.

pytz and astimezone() cannot be applied to a naive datetime

I have a date and I need to make it time zone aware. local_tz = timezone('Asia/Tokyo') start_date = …

python datetime timezone pytz
pytz - Converting UTC and timezone to local time

I have a datetime in utc time zone, for example: utc_time = datetime.datetime.utcnow() And a pytz timezone object: …

python timezone utc pytz
pytz localize vs datetime replace

I'm having some weird issues with pytz's .localize() function. Sometimes it wouldn't make adjustments to the localized datetime: .localize behaviour: &…

python datetime timezone utc pytz
Python: How do you convert a datetime/timestamp from one timezone to another timezone?

Specifically, given the timezone of my server (system time perspective) and a timezone input, how do I calculate the system …

python datetime timezone pytz timedelta
Daylight savings time in Python

I am writing a program which deals a lot with timezones and crossing them. The two things I deal with …

python datetime dst pytz
How to check if a datetime object is localized with pytz?

I want to store a datetime object with a localized UTC timezone. The method that stores the datetime object can …

python datetime timezone pytz
pytz utc conversion

What is the right way to convert a naive time and a tzinfo into an UTC time? Say I have: …

python datetime utc pytz
How to get the common name for a pytz timezone eg. EST/EDT for America/New_York

Given a pytz timezone for a particular user(calculated from his offset), i want to display the common name for …

python django timezone pytz
Get system local timezone in python

Seems strange, but I cannot find an easy way to find the local timezone using Pandas/pytz in Python. I …

python python-2.7 pandas timezone-offset pytz
how to get tz_info object corresponding to current timezone?

Is there a cross-platform function in python (or pytz) that returns a tzinfo object corresponding to the timezone currently set …

python datetime time timezone pytz