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

Converting from string to timestamp uses microseconds instead of milliseconds #780

Closed
ilya-biryukov opened this issue Sep 16, 2021 · 0 comments · Fixed by #781
Closed

Converting from string to timestamp uses microseconds instead of milliseconds #780

ilya-biryukov opened this issue Sep 16, 2021 · 0 comments · Fixed by #781
Labels

Comments

@ilya-biryukov
Copy link
Contributor

Describe the bug
Calls to string_to_timestamp_nanos may parse fractional part of a second as nanoseconds instead of microseconds or milliseconds.

To Reproduce
Call string_to_timestamp_nanos("1970-01-01T00:00:00.123"), it produces a timestamps of 123 nanoseconds since UNIX epoch.
Local timezone must be UTC.

Expected behavior
A timestamps of 123 milliseconds since UNIX Epoch is returned.

Additional context
I have prepared a fix too, sending it out soon.

ilya-biryukov added a commit to cube-js/arrow-rs that referenced this issue Sep 16, 2021
Some datetime formats passed to `string_to_timestamp_nanos` were parsing
milliseconds as nanoseconds.

E.g. `1970-01-01 00:00:00.123` would parse as `123` nanoseconds instead
of milliseconds.
alamb pushed a commit that referenced this issue Sep 17, 2021
Some datetime formats passed to `string_to_timestamp_nanos` were parsing
milliseconds as nanoseconds.

E.g. `1970-01-01 00:00:00.123` would parse as `123` nanoseconds instead
of milliseconds.
alamb pushed a commit that referenced this issue Sep 21, 2021
Some datetime formats passed to `string_to_timestamp_nanos` were parsing
milliseconds as nanoseconds.

E.g. `1970-01-01 00:00:00.123` would parse as `123` nanoseconds instead
of milliseconds.
alamb added a commit that referenced this issue Sep 21, 2021
…) (#791)

Some datetime formats passed to `string_to_timestamp_nanos` were parsing
milliseconds as nanoseconds.

E.g. `1970-01-01 00:00:00.123` would parse as `123` nanoseconds instead
of milliseconds.

Co-authored-by: Ilya Biryukov <iu.biryukov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant