Giter Site home page Giter Site logo

Comments (2)

ash14 avatar ash14 commented on August 25, 2024 1

It seems as if some internal logic is failing to zero out hour/minute components on time zone changes across dates (comparison with zero, perhaps?)

One way to reproduce this without "invalid" years like 200 can be, e.g. when in the Asia/Hong_Kong timezone:

  • Paste 05/05/2020, output: 2020-05-04T16:00:00.000Z. Expected.
  • Paste 25/12/1941, output: 1941-12-24T15:30:00.000Z. Expected.
  • Paste back 05/05/2020 again, output is 2020-05-04T16:30:00.000Z which is not expected

from mui-x.

LukasTy avatar LukasTy commented on August 25, 2024

This is a really strange behavior on dayjs side.
The problem seems to stem from the fact that the year 200 is considered valid by dayjs, but when a date is created, the offset gets messed up as seen in the screenshot below.
The first two lines are for the 2-digit year format
The 3rd and 4th lines are for the 4-digit year format
Both are in the America/New_York timezone on a device with GMT+3 timezone.
Screenshot 2024-03-22 at 16 12 33
Pasting the 2005 value directly does not result in this problem.

This is just an initial report and needs further investigation.

from mui-x.

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.