Code Monkey home page Code Monkey logo

Comments (2)

valentin-krasontovitsch avatar valentin-krasontovitsch commented on July 18, 2024 2

i think it might be fixed now - the tests pass, at least with arrow 0.15.5 - thanks for the pointers regarding the necessary changes!

My impression of the changes is that one must use replace when changing the locale and setting a value, like microsecond=0, while shift is good to use for days=+1, as you describe. but i don't claim to really get arrow... let's hope that this holds up.

will merge soon, i think, and cut a new release - which i sadly still cannot publish on pip, but hopefully that will be fixed soon as well!

from bonfire.

systemcatch avatar systemcatch commented on July 18, 2024

arrow was changed (way before 0.15.4) to stop replace being used to shift the entire object.

This changes only the second attribute, nothing else.

arw=arrow.utcnow()
arw_later=arw.replace(second=37)

To fix your tests use the shift method which will update the entire object.

arw=arrow.utcnow()
arw_later=arw.shift(seconds=+37)

I'd recommend upping your pinned arrow versions (see changelog) if possible as 0.5.4 is very old, note that 0.15.0+ have breaking changes to do with parsing.

from bonfire.

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.