Skip to content

Fix #8#12

Open
kurahaupo wants to merge 1 commit into
alexandrebelloni:masterfrom
kurahaupo:patch-1
Open

Fix #8#12
kurahaupo wants to merge 1 commit into
alexandrebelloni:masterfrom
kurahaupo:patch-1

Conversation

@kurahaupo
Copy link
Copy Markdown

Fix logic error

Fix logic error
@kurahaupo
Copy link
Copy Markdown
Author

Fixed #8

@kurahaupo
Copy link
Copy Markdown
Author

kurahaupo commented Jun 30, 2024

And... nope!

Commit 247cbeb fixes TZ=America/Iqaluit, changing

  • EST5EDT,M3.2.0/3,M11.1.0 (incorrect) to
  • EST5EDT,M3.2.0,M11.1.0 (correct).

But unfortunately it breaks TZ=Pacific/Auckland, changing

  • NZST-12NZDT,M9.5.0,M4.1.0/3 (correct) to
  • NZST-12NZDT,M9.5.0/3,M4.1.0/3 (incorrect).

I will need to investigate why, including whether the code copes with DST at the start and end of the year, rather than in the middle of the year.

@kurahaupo
Copy link
Copy Markdown
Author

The logic when constructing the TZ string is to search the list of transitions for the next two transitions. That's why the current time matters.

The problem isn't specifically whether you're "currently in DST" but whether you're in the middle of the year (so the next two transitions are in different years) or around the start or end of the year (so the next two transitions are in the same year).

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

Successfully merging this pull request may close these issues.

1 participant