Git Product home page Git Product logo

Comments (4)

mfogel avatar mfogel commented on June 2, 2024 1

Ahh, I see what's going on. Thanks @babu-upcomer for the link and more detailed explanation.

Yeah I think for anyone using this field and using the kwarg choices_display='WITH_GMT_OFFSET' they probably got this error during the recent north america DST transition.

It looks like Europe will be undergoing a DST transition in a few weeks, I will plan to get this bug fixed and an update pushed to pypi before then.

from django-timezone-field.

mfogel avatar mfogel commented on June 2, 2024

Yeah, under the hood this field uses pytz to get metadata about timezones. If pytz doesn't recognize a string as a valid timezone, it will throw one of those NonExistentTimeError exceptions. So it looks like that's whats happening here: the obsolete timezones are not being recognized by pytz.

If you have to support the obsolete timezones, perhaps just a standard string field with a choices argument might suffice?

from django-timezone-field.

babus avatar babus commented on June 2, 2024

@mfogel Thanks for responding! I think the problem isn't with the obsolete timezones even America/Adak is in pytz.common_timezones. I guess that it can be fixed with any one of the solutions put out here and also this exception from pytz is intentional. is_dst needs to be sent True or False based on the exceptions. Since this blocks the initialization of the models and so the gunicorn workers to crash when they restart, I think this needs to be prioritized. I'm sure that everyone who is using the library in production have had bunch of errors for like an hour in the reported time.

Thanks for the work!
/Babu

from django-timezone-field.

mfogel avatar mfogel commented on June 2, 2024

Fix released as part of v4.1.2

from django-timezone-field.

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.