influxdata / influxdata/influxdb-java

InfluxDBMapper.toPOJO() bug?

Open
#834 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.2k
Forks
469
PR merge metrics
No merged PRs in 30d

Description

When call `InfluxDBMapper.toPOJO()` , if the time field type is **String** and the millisecond value is an integer multiple of ten, it miss the last zero.
Such as:
If the timestamp is `1653354743560`, the result is `2022-05-24T01:12:23.56Z`, it should be `2022-05-24T01:12:23.560Z`?

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

Start at the InfluxDBMapper.toPOJO() entry point and reproduce the conversion with the timestamp 1653354743560 and a String time field. Check how milliseconds are formatted, then verify that the resulting value preserves the trailing zero as 2022-05-24T01:12:23.560Z.

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
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.