Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeStamp Issues (postic/unix) 19 digits posix #43

Open
ghost opened this issue Dec 11, 2020 · 2 comments
Open

TimeStamp Issues (postic/unix) 19 digits posix #43

ghost opened this issue Dec 11, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 11, 2020

Seems to be unable to import 19 digit posix dates

python3 csvtoinflux.py -i server1.csv -s server5:8086 --create --dbname NewTest --tagcolumns host --fieldcolumns CPU,GPU --metricname name --timecolumn time --timeformat posix
Deleting database NewTest
Creating database NewTest
Traceback (most recent call last):
File "csvtoinflux.py", line 200, in
args.timezone, args.ssl)
File "csvtoinflux.py", line 78, in loadCsv
datetime_naive = datetime.datetime.fromtimestamp(int(row[timecolumn]))
OverflowError: timestamp out of range for platform time_t

CSV looks like this :

name,time,CPU,GPU,host
temperature,1590335330162702714,53.5,53,server1
temperature,1590335335297033388,54,53,server1

@7yl4r
Copy link
Collaborator

7yl4r commented Jan 19, 2021

The relevant code is here. It would be great to have a test for this.

@Bugazelle
Copy link
Owner

Hello @lee-weedon

Sorry for the delay
The latest lib 0.2.0 should fix your issue

Please upgrade to the latest version: pip install ExportCsvToInflux --upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants