GithubHelp home page GithubHelp logo

Comments (6)

jhpratt avatar jhpratt commented on June 16, 2024

Two things here:

  1. Leap seconds are not properly handled. A trivial demo shows this using a leap second that has actually occurred. This is a bug and will be fixed.
  2. If you are using 2023-12-11T11:31:60.000Z as your test case, don't. Leap seconds have only occurred as the last second of either half of the year (i.e. Jun 30, Dec 31 at 23:59:60). December 11 obviously is not that. Theoretically they can happen at the end of any month (per definition of UTC), but in reality preference is given to June or December, with March and September being alternates.

from time.

dracarys18 avatar dracarys18 commented on June 16, 2024
  1. @jhpratt This is not a testcase this is from our logs

from time.

jhpratt avatar jhpratt commented on June 16, 2024

I would suggest looking into your logging system in that case, as it's producing invalid values.

from time.

dracarys18 avatar dracarys18 commented on June 16, 2024

@jhpratt So this is generated by this function and I got this exact value from logs which was throwing deserialisation error.

from time.

jhpratt avatar jhpratt commented on June 16, 2024

Time holding a seconds value of 60 would be the only way for the crate to output that string barring a hard-coded literal in the format description. After quickly checking what is called all the way down, there's no way that that is what's causing this. The seconds field is ultimately calculated in Time::adjusting_add, and it's quite easy to verify that the implementation there is correct.

from time.

jhpratt avatar jhpratt commented on June 16, 2024

Fixed on main. It will be released shortly.

from time.

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.