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

Wrong UTC offset in the list of timezones #1335

Closed
imobachgs opened this issue Jun 14, 2024 · 5 comments
Closed

Wrong UTC offset in the list of timezones #1335

imobachgs opened this issue Jun 14, 2024 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers ux UX related bugs/improvements

Comments

@imobachgs
Copy link
Contributor

Reported by @jreidinger:

many countries has UTC even when their timezone is like UTC+2, so probably something is wrong at
source data or during processing

but I see when search e.g. for UTC-7

@imobachgs imobachgs added the bug Something isn't working label Jun 14, 2024
@imobachgs
Copy link
Contributor Author

@imobachgs imobachgs changed the title Wrong UTC zone in the list of timezones Wrong UTC offset in the list of timezones Jun 14, 2024
@imobachgs imobachgs added the good first issue Good for newcomers label Jun 17, 2024
@mvidner
Copy link
Contributor

mvidner commented Jun 28, 2024

@jreidinger I cannot see the problem now. Can you guide me to find it?
agama-tzofs

(BTW note how it shows the current UTC offset, applying the daylight savings time.)

@imobachgs imobachgs added the ux UX related bugs/improvements label Jun 28, 2024
@imobachgs
Copy link
Contributor Author

It happens only in some cases (I do not know how many). But some timezones are reported as UTC when they are not. Two examples: Atlantic/Canary (UTC+1) and Americas/Adak (UTC-9).

@dgdavid
Copy link
Contributor

dgdavid commented Sep 24, 2024

Just in case it might help, would worth having a look at https://github.com/date-fns/tz

Not only for using it if needed (I'd do if it make our code work as expected) but also to check if there is something to learn from its source code and tests,

https://github.com/date-fns/tz/tree/main/src/tzOffset

imobachgs added a commit that referenced this issue Sep 30, 2024
## Problem

The UTC offset is not properly calculated, as shown in #1335.

## Solution

* Reimplement the UTC calculation.
* Rely on [@date-fns/tz](https://github.com/date-fns/tz).

## Screenshot

![Captura desde 2024-09-30
12-25-24](https://github.com/user-attachments/assets/389cf643-02f2-4509-8648-99f563348d75)
@imobachgs
Copy link
Contributor Author

The problem is fixed in #1646.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers ux UX related bugs/improvements
Projects
None yet
Development

No branches or pull requests

3 participants