Comments (4)
As documented in the table of tokens, ZZZZZ
is not a valid parsing token. Luxon can only parse time zones from their IANA names (or from an offset, like you are already doing), this uses the token z
. The reason for this is that there is no browser API to parse "human readable" time zone names and those names are not even consistent or unique.
from luxon.
This specific limitation is also discussed here: https://moment.github.io/luxon/#/parsing?id=limitations
from luxon.
Is there a viable workaround for this? I'm dealing with 3rd party data that uses the abbreviated timezone eg BST
from luxon.
Unfortunately the only real option you have is to ship your own mapping of abbreviated zones to proper time zone names and do the replacement manually before passing it in to Luxon or otherwise. I'm not 100% sure where you'd find this, but most likely either in the IANA Time Zone Database or maybe in Unicode's ICU.
from luxon.
Related Issues (20)
- published package.json causing problems in CycloneDX Webpack Plugin
- Why luxon and graphql doesn't parse `TIMESTAMPTZ` postgresql datatype when using DateTime type?
- `Duration.toHuman` throws RangeError when Duration uses `quarters` HOT 1
- Duration.toISOTime() returns null when hours > 24 HOT 1
- DateTime is not invalid like it should be when using hour 15 with 12-hour time token. HOT 2
- `until` should always return an Interval
- fromFormat ZZZZ doesn't parse UTC, returns null HOT 1
- Can we create a PR for a built-in toISOWeek() method?
- Info.weekdays returning null for different locale(de, ro) on iOS(simulator and real device) HOT 3
- Last week of year is weekNumber 1 HOT 1
- Interval.splitBy for seconds HOT 1
- Incorrect short format for timezone offset names HOT 1
- `defaultWeekSettings` does not exist on type `typeof Settings` HOT 2
- Local Week year is wrong on Firefox for `en-US`, `fr-CA` (locales with weeks starting on Sunday).
- Question: Global settings default locale, will it override the settings for simultaneous requests? HOT 1
- แนะนําสําหรับผู้เริ่มต้น
- Settings.defaultWeekSettings not working HOT 1
- Duration.toFormat does not display milliseconds correctly HOT 1
- fromFormat parsing fails on productions, works on development HOT 2
- Add optional startOfWeek param for startOf() and endOf() methods HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luxon.