question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow fold kwarg in arrow.get()

See original GitHub issue

Currently there is no way to specify which side of an ambiguous datetime we want when creating with arrow.get(). It’d be nice to be able to do the following.

arrow.get("2001-10-28 01:00:00", "YYYY-MM-DD HH:mm:ss", tzinfo="US/Pacific", fold=1)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
systemcatchcommented, Oct 30, 2021

@sania-dsouza we would expect the following.

>>> arrow.Arrow(2001, 10, 28, 1, tzinfo="US/Pacific")
<Arrow [2001-10-28T01:00:00-07:00]>
>>> arrow.Arrow(2001, 10, 28, 1, tzinfo="US/Pacific", fold=1)
<Arrow [2001-10-28T01:00:00-08:00]>
1reaction
systemcatchcommented, Nov 29, 2020

Hey @yiransii for now we can stick with the enfold method. We just need to make sure that the fold kwarg is handled correctly in the get() method (https://github.com/arrow-py/arrow/blob/master/arrow/factory.py#L146).

Read more comments on GitHub >

github_iconTop Results From Across the Web

API Guide — Arrow 1.2.3 documentation
arrow.factory ¶ ... Implements the ArrowFactory class, providing factory methods for common Arrow construction scenarios. ... A factory for generating Arrow objects ...
Read more >
Range() doesn't work properly on twenty-five hour days · Issue #871 ...
So the result for your range method is correct (mostly, depends on dateutil), however it would be nice to be able to pass...
Read more >
How to use kwargs in matplotlib.axes.Axes.arrow python 2.7
Code finished when I passed linestyle key as a string, but I am not getting the dashed arrow line that I was hoping...
Read more >
fsspec Documentation - Read the Docs
open(), to allow you to quickly get from a URL to a file-like object that you ... These are mostly used internally within...
Read more >
API Changes — Matplotlib 1.3.1 documentation - omz:software
To get the colorbar axes it is possible to just use the ax attribute on a colorbar ... A new keyword extendrect in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found