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.

Negative timestamp parsing on windows: timestamp out of range for platform localtime()/gmtime() function

See original GitHub issue

Thanks for arrow!

Over on conda-forge, our build of 0.15.1 turned up this test fail on windows:

ERROR: test_parse_timestamp (tests.parser_tests.DateTimeParserParseTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\bld\arrow_1568153654810\_test_env\lib\site-packages\chai\chai.py", line 63, in wrapper
    func(self, *args, **kwargs)
  File "D:\bld\arrow_1568153654810\test_tmp\tests\parser_tests.py", line 229, in test_parse_timestamp
    self.expected = datetime.fromtimestamp(negative_int_timestamp, tz=tz_utc)
ValueError: timestamp out of range for platform localtime()/gmtime() function

----------------------------------------------------------------------
Ran 385 tests in 1.109s

Excluding this on windows got things going again, but is this a cause for concern?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
bollwyvlcommented, Sep 11, 2019

Thanks for the clarification! Merged -1 minutes from now!

On Tue, Sep 10, 2019 at 9:47 PM Jad Chaar notifications@github.com wrote:

@bollwyvl https://github.com/bollwyvl thanks for reporting this. This is due to the new regression tests we added as part of the fix for #662 https://github.com/crsmithdev/arrow/issues/662. It seems that datetime on Windows does not play nicely with negative timestamps (ref: https://stackoverflow.com/questions/36179914).

I will need to do some more investigating, but this should not be an issue if you are not using negative time stamps 😃.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/crsmithdev/arrow/issues/668?email_source=notifications&email_token=AAALCRADHDDS7MYQE35GOA3QJBE3ZA5CNFSM4IVNUWQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6M7UKI#issuecomment-530184745, or mute the thread https://github.com/notifications/unsubscribe-auth/AAALCRHNHBYQSSOCOWMHWN3QJBE3ZANCNFSM4IVNUWQA .

0reactions
jadchaarcommented, Sep 14, 2019

Hey @bollwyvl, we have released 0.15.2, which includes the fix for tests on Windows 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timestamp out of range for platform localtime()/gmtime() function
For many values, like too far in the past or the future, just feeding the timestamp to fromtimestamp() will complain with an out...
Read more >
Proper conversion of timestamp - Google Groups
Hi, ALL, I'm getting this: timestamp out of range for platform localtime()/gmtime() function trying to convert the timestamp with milliseconds into the ...
Read more >
time — Time access and conversions — Python 3.11.1 ...
Function strptime() can parse 2-digit years when given %y format code. ... localtime() may raise OverflowError , if the timestamp is outside the...
Read more >
D135045 [Frontend] Recognize environment variable ... - LLVM
The time_t value may be negative and its value range is platform-dependent. It is better to be as transparent as possible. gmtime/localtime ......
Read more >
16.3. time — Time access and conversions
Most of the functions defined in this module call platform C library ... The time value as returned by gmtime() , localtime() ,...
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