influxdata / influxdata/influxdb-java

fromInfluxDBTimeFormat does not parse milliseconds correct

Open
#339 2 comments 0 reactions 0 assignees View on GitHub
difficulty/low kind/bug
Dominant language
Java
Stars
1.2k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

If a timestamp has a 10-millisecond time (last digit 0), the returned milliseconds time is not correct.

.time(1497600000030L, TimeUnit.MILLISECONDS)

after reading from database:
fromInfluxDBTimeFormat(raw.get(0).toString()) returns "1497600000003"

the database contains "2017-06-16T08:00:00.03Z"

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the fromInfluxDBTimeFormat entry point and trace how the database timestamp string is converted to milliseconds. Reproduce the 30-millisecond case from the issue, then add coverage for timestamps ending in a zero millisecond digit and confirm the conversion returns 1497600000030.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.