You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
In the write_points function with json protocol and time_precision = 'n'.
There is a line in the code (line # 217 in version 4.1.1 - see snippet below ) that basically takes a datetime value and divided it by 1. However the division is done using float (/) versus integer division (//). This changes the last few digits of the datetime being written. E.g. it the value 1502114400290050489 when divided by 1 using / changes to 1.5021144002900506e+18. When using // and dividing by 1 it remains unchanged.
In the write_points function with json protocol and time_precision = 'n'.
There is a line in the code (line # 217 in version 4.1.1 - see snippet below ) that basically takes a datetime value and divided it by 1. However the division is done using float (/) versus integer division (//). This changes the last few digits of the datetime being written. E.g. it the value 1502114400290050489 when divided by 1 using / changes to 1.5021144002900506e+18. When using // and dividing by 1 it remains unchanged.
------------CODE COPY BELOW------------------------------------
points = [
{'measurement': measurement,
'tags': dict(list(tag.items()) + list(tags.items())),
'fields': rec,
'time': int(ts.value / precision_factor)}
for ts, tag, rec in zip(dataframe.index,
dataframe[tag_columns].to_dict('record'),
dataframe[field_columns].to_dict('record'))
The text was updated successfully, but these errors were encountered: