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

Timex.parse for {Zabbr} not working #745

Open
edborsa opened this issue Sep 7, 2023 · 2 comments
Open

Timex.parse for {Zabbr} not working #745

edborsa opened this issue Sep 7, 2023 · 2 comments

Comments

@edborsa
Copy link

edborsa commented Sep 7, 2023

Hey @everyone.

I was trying to parse some dates and noticed that the parse pattern matching for {Zabbr} not working.
Example:
Timex.parse("07/24/2023 05:46:15 AM EDT", "{0M}/{0D}/{YYYY} {h12}:{m}:{s} {AM} {Zabbr}")

But for example the {Zname} works:
Timex.parse("07/24/2023 05:46:15 AM America/New_York", "{0M}/{0D}/{YYYY} {h12}:{m}:{s} {AM} {Zname}")

If you inspect the Timex.Timezone.get("America/New_York").abbreviation it returns EDT, so I am sure that EDT is the {Zabbr}

The "America/New_York" is just an example here, all {Zabbr} are not working.

Timex version: @Version "3.7.11"

@hissssst
Copy link

I have the same issue. After reading the code, it appears that Zabbr is parsed exactly the same way as Zname. No idea why this type exists then

@hissssst
Copy link

It seems that everything comes to Tzdata providing no API to search for timezone by abbreviation

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