stub42 / pytz

pytz Python historical timezone library and database
MIT License
353 stars 93 forks source link

Wrong egypt timezone when using datetime replace #98

Open Om4ar opened 1 year ago

Om4ar commented 1 year ago

hello

when i run the following code

from datetime import datetime
from pytz import timezone

print(datetime.strptime("2023-03-21T09:05:46.807Z", "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=timezone("Africa/Cairo")))

it prints 2023-03-21 09:05:46.807000+02:05. with egypt offset as +02:05 but it should have been +02:00

ryanwild7 commented 1 year ago

The same with Perth Time Zone