Top "Pytz" questions

pytz brings the Olson tz database into Python.

Converting an un-aware timestamp into an aware timestamp for UTC conversion

I created a datetime that is unaware using the code below and I need to have it in UTC since …

python timezone pytz
Python pytz Converting a timestamp (string format) from one timezone to another

I have a timestamp with timezone information in string format and I would like to convert this to display the …

python timezone timestamp pytz
Import pytz into AWS lambda function

I'm writing a lambda function that works with datetimes and trying to import pytz so I can have timezone be …

python python-3.x timezone aws-lambda pytz
Python datetime object show wrong timezone offset

I am try creating a datetime object in python using datetime and pytz, the offset shown is wrong. import datetime …

python datetime pytz
How do you convert a naive datetime to DST-aware datetime in Python?

I'm currently working on the backend for a calendaring system that returns naive Python datetimes. The way the front end …

python datetime timezone pytz
Python pytz timezone function returns a timezone that is off by 9 minutes

For some reason which I haven't been able to figure out yet, from the the following code: >>> …

python timezone timezone-offset pytz
unexpected results converting timezones in python

I'm trying to understand why I'm getting these results when converting timezones to UTC: In [74]: d1 = datetime(2007, 12, 5, 6, 30,tzinfo=pytz.timezone(…

python pytz
pytz: Why is normalize needed when converting between timezones?

I'm reading the not so complete pytz documentation and I'm stuck on understand one part of it. Converting between timezones …

python timezone pytz
Get country code for timezone using pytz?

I'm using pytz. I've read through the entire documentation sheet, but didn't see how this could be done. I have …

python pytz
pytz.astimezone not accounting for daylight savings?

On 2013 Jun 1 I expect the "PST8PDT" timezone to behave like GMT+7, as it is daylight savings in that timezone. …

python dst pytz