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

Support Windows Timezones #74

Open
alejcas opened this issue Feb 28, 2024 · 4 comments
Open

Support Windows Timezones #74

alejcas opened this issue Feb 28, 2024 · 4 comments
Labels
discussion Discussion is needed before proceeding

Comments

@alejcas
Copy link

alejcas commented Feb 28, 2024

Hi I like whenever implementation as it address a lot of problems I face when using datetimes.

I would like to see if it fits into whenever to support windows timezones:

See O365 windows timezones support

Windows timezones are horrible in every imaginable situation, but they are used sometimes (mainly outlook).

The problem is that you can get a windows timezone from an Iana one and it's not ambiguos, but not the other way around.
It will be a guess:

For example both Romance Standard Time (wtf is romance standard time anyway??) can be "Europe/Paris", "Europe/Madrid", etc..

Thanks

@ariebovenberg
Copy link
Owner

Oof, unfortunate that these are used 😬

what would support for windows timezones look like to you, ideally?

Since the translation of windows TZ to IANA tz is incomplete, it won't be possible to do something like ZonedDateTime(..., tz="Romance Standard Time")

The most I can think of would be to have a .tz_windows() method that translates the IANA tz to a windows one, but I'm struggling to justify such a relatively niche method, which could also be done by defining a mapping. 🤔

@ariebovenberg ariebovenberg added the discussion Discussion is needed before proceeding label Feb 28, 2024
@alejcas
Copy link
Author

alejcas commented Feb 28, 2024

In fact it’s just having this mapping into whenever and some helper methods that will convert from one and another (one way unambiguous and the other way just a guess..).

Maybe something to consider for the future.

thanks

@bxparks
Copy link

bxparks commented Feb 28, 2024

I would support this using the injectable TzProvider as I outlined in #65, using a MicrosoftTzProvider. My understanding is that Microsoft uses its own timezone classification scheme that is different from IANA.

@ariebovenberg
Copy link
Owner

An injectable tzprovider is definitely on the table, albeit with a low priority at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion is needed before proceeding
Projects
None yet
Development

No branches or pull requests

3 participants