Remove Timestamp::Now #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Undoes #51
Due to inconsistencies between InfluxDb v1.7 and InfluxDb v1.8, I have decided to remove the Timestamp::Now value. Previously, when using this, InfluxDb would use the current system time in RFC3339.
The new way of using the current time for a write is to calculate the time in Rust and send it to InfluxDb along the request. This way, any delay on the way to InfluxDb is also not an issue any more and the time of creating the Query in Rust is the one being used.
One simple piece of code to achieve this is
The library could supply helper functions to calculate the timestamp to be used together with the existing Timestamp initializers.
Checklist
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo readme > README.md