Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytz is giving (UTC+11) instead of (UTC+8) for Antarctica/Casey timezone #14

Open
Keshavgoyal788 opened this issue May 16, 2022 · 1 comment

Comments

@Keshavgoyal788
Copy link

Keshavgoyal788 commented May 16, 2022

I am using pytz library for importing the coordinated universal time for different timezones. I have tried fetching the UTC time for Antarctica/Casey timezone which expectedly should return (UTC+8) for the current time period but is returning (UTC+11). Antarctica/Casey timezone has the DST enabled for 3hrs and for which time varies between (UTC+8) and (UTC+11).
Casey Station changes between UTC+8 in the winter season and UTC+11 in the summer season. The Australian station's time changes line up—for the most part—with the switch to Daylight Saving Time (DST) in Australia. So, when Tasmania sets the clocks forward one hour for DST to UTC+11, Casey sets its clocks forward three hours to UTC+11. Sometimes, these dates are moved depending on supply boats or flights to the station, so time changes in Casey are often labeled preliminary.

Time Changes in Casey Over the Years
Daylight Saving Time (DST) changes do not necessarily occur on the same date every year.

Time zone changes for:
Recent/upcoming years

Year Date & Time Abbreviation Time Change Offset After
2021 Sun, 14 Mar, 00:00 CAST (not changed) -3 hours (TZ change) UTC+8h
Sun, 3 Oct, 00:01 CAST (not changed) +3 hours (TZ change) UTC+11h
2022 Sun, 13 Mar, 00:00 CAST (not changed) -3 hours (TZ change) | Probable date UTC+8h
Sun, 2 Oct, 00:01 CAST (not changed) +3 hours (TZ change) | Preliminary date UTC+11h
2023 — 2025 No known changes, UTC +11 hours all of the period

@Keshavgoyal788 Keshavgoyal788 changed the title Pytz is giving (UTC+11) instead of (UTC+8) for Australia/Casey timezone Pytz is giving (UTC+11) instead of (UTC+8) for Antarctica/Casey timezone May 17, 2022
@Aravindms369
Copy link

I am also facing the same issue with pytz timezone of Antarctica/Casey Please provide some help in same.

>>> from datetime import datetime
>>> import pytz
>>> timezone= 'Antarctica/Casey'
>>> splitted_timezone = datetime.now(pytz.timezone(timezone)).strftime('%z')
>>> offset_value = [splitted_timezone[1:3], splitted_timezone[3:5]]
>>> print(offset_value)
['11', '00']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants