influxdata / influxdb-client-python

InfluxDB 2.0 python client
https://influxdb-client.readthedocs.io/en/stable/
MIT License
724 stars 187 forks source link

Add lower-to-higher precision conversion in _convert_timestamp #650

Closed rwader-swi closed 3 months ago

rwader-swi commented 8 months ago

Closes #

Proposed Changes

Currently the _convert_timestamp util only supports higher precision to lower precision time conversion. Some of the usecases might need the opposite, and instead of writing on our own we wish to use this already present utility. In my usecase the data is in floating point as seconds which I might want to convert to nanoseconds or other precision. So did some small changes.

Checklist

bednar commented 3 months ago

This PR has been closed because it has not had recent activity. Please reopen if this PR is still important to you and you want to continue with them.

codecov-commenter commented 2 weeks ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.42%. Comparing base (a645ea9) to head (0a8ea0b). Report is 26 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #650 +/- ## ======================================= Coverage 90.42% 90.42% ======================================= Files 39 39 Lines 3509 3509 ======================================= Hits 3173 3173 Misses 336 336 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.