Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of Time values out of UnixNano range #804

Merged
merged 3 commits into from Mar 27, 2020
Merged

Fix handling of Time values out of UnixNano range #804

merged 3 commits into from Mar 27, 2020

Commits on Mar 24, 2020

  1. Fix handling of Time values out of UnixNano rnage

    Fixes #737, #803.
    
    Time values are encoded by storing the UnixNano representation, but this
    fails when the value of UnixNano is out of int64 range, see docs:
    
    https://golang.org/pkg/time/#Time.UnixNano
    > The result is undefined if the Unix time in nanoseconds cannot be
    represented by an int64 (a date before the year 1678 or after 2262)
    
    Fix this by storing values outside of UnixNano range as-is rather
    than using UnixNano with a new Field type.
    prashantv committed Mar 24, 2020
    Copy the full SHA
    e48bc3e View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2020

  1. _minTime should use math.MinInt64, and test for it

    Co-Authored-By: Abhinav Gupta <abg@uber.com>
    prashantv and abhinav committed Mar 26, 2020
    Copy the full SHA
    06a1362 View commit details
    Browse the repository at this point in the history
  2. Use time.Equal to ensure times are not the same

    Co-Authored-By: Abhinav Gupta <abg@uber.com>
    prashantv and abhinav committed Mar 26, 2020
    Copy the full SHA
    0182292 View commit details
    Browse the repository at this point in the history