Giter VIP home page Giter VIP logo

Comments (1)

aqw avatar aqw commented on July 23, 2024

From the commit message

As a summary, this method is:

  • Faster (doesn't spawn subshell and the external date command
  • More accurate (y and m are now /calendar/ rather than 365d and 30d, respectively). Leap years are supported.
  • More portable. This is POSIX compatible and doesn't rely on GNU or BSD specific features.
  • More future proof. This code will handle dates past 2038 (epoch death) and prior to 1970 (not that the latter is needed).
  • Fixes at least one known, unreported bug (snapshot name of 2022-09-04_02.06.00--10y is silently skipped). This is likely due to an integer overflow.

Downsides are:

  • We're maintaining our own understanding of dates now, which can get very ugly. However, the previous solution already had a very rigid definition of time. This solution is more correct -- albeit not 100% correct.
  • Leap seconds are still not handled (I choose not to care; only 3 in last 10 years).
  • The Gregorian Calendar is still required (likely to remain a hard dependency).
  • We still don't handle time zones or DST. This should be fixed in the future, but will involve real effort to not break support for pre-TZ snapshots.

from zfsnap.

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.