home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 302447879

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
302447879 MDExOlB1bGxSZXF1ZXN0MTcyOTc1OTY4 1965 avoid integer overflow when decoding large time numbers 3404817 closed 0     6 2018-03-05T20:21:20Z 2018-05-01T12:41:28Z 2018-05-01T12:41:28Z CONTRIBUTOR   0 pydata/xarray/pulls/1965

The issue: int32 time data in seconds or so leads to an overflow in time decoding.

This is in way the back side of #1859: By ensuring that _NS_PER_TIME_DELTA is integer, we got rid of round-off errors that were due to casting to float but now we are getting int overflow in this line:

https://github.com/pydata/xarray/blob/0e73e240107caee3ffd1a1149f0150c390d43251/xarray/coding/times.py#L169-L170

e.g. '2001-01-01' in seconds since 1970-01-01 means np.array([978307200]) * int(1e9) which gives 288686080 that gets decoded to '1970-01-01T00:00:00.288686080' -- note also the trailing digits. Something is very wrong here.

  • [x] Tests added (for all bug fixes or enhancements)
  • [x] Tests passed (for all non-documentation changes)
  • [x] Fully documented, including whats-new.rst for all changes
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1965/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.556ms · About: xarray-datasette