influxdata / influxdata/influxdb-java

fromInfluxDBTimeFormat does not parse milliseconds correct

Open
#339 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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.