Coder Social home page Coder Social logo

Comments (4)

diesieben07 avatar diesieben07 commented on June 14, 2024 1

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.

icambron avatar icambron commented on June 14, 2024 1

This specific limitation is also discussed here: https://moment.github.io/luxon/#/parsing?id=limitations

from luxon.

paul-uz avatar paul-uz commented on June 14, 2024

Is there a viable workaround for this? I'm dealing with 3rd party data that uses the abbreviated timezone eg BST

from luxon.

diesieben07 avatar diesieben07 commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.