influxdata / influxdata/influxdb

Time shift (many months) in time conversion after importing data (csv-import, CLI, line protocol ...)

Open
#23,079 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__Steps to reproduce:__
This seems to be a principle problem, but one scenario is very easy to reproduce

1.) Go in the web-frontend to Data->Line Protocol to enter data manually
![grafik](https://user-images.githubusercontent.com/98594596/151650960-484cd0e4-e462-45b4-860a-ab59fbf137a5.png)

2.) Use exactly the example string mentioned below
![grafik](https://user-images.githubusercontent.com/98594596/151650779-ac8099fc-3911-4646-b296-8fb0148b354a.png)

1556813561098000000 should represent **Thu May 02 2019 16:12:41 GMT+0000**
3.) Go to the data base an verify the time
![grafik](https://user-images.githubusercontent.com/98594596/151650977-e9086454-24a5-430f-83a3-8748ad065e38.png)

You can see that the time is not correct **(2019-07-18T05:04:10.000Z)**

4.) Make an csv export of this data

![grafik](https://user-images.githubusercontent.com/98594596/151651000-b8477c13-a7b1-4209-9dae-a7b703ea952a.png)

5.) Import the same file to the same bucket

6.) You can see that there has been another time inserted
![grafik](https://user-images.githubusercontent.com/98594596/151651030-a2ff634e-ede1-482f-9c05-207e6a052bb3.png)

**Thu May 02 2019 16:12:41 GMT+0000 --> 2019-07-18T05:04:10.000Z --> 2019-11-20T00:08:20.000Z**

__Expected behavior:__
Importing time values from the past should work (without a time shift)

__Actual behavior:__
There is a problem converting the time.
Import data without time works fine (uses actual time)
The problem must be general because I detected it with csv import of an excel sheet via CLI.

__Environment info:__
*Running on Windows 10
*InfluxDB 2.1.1 (actual released version)

Contributor guide

Open the contributing guide

Research direction

Reproduce the timestamp conversion through the web frontend's Data→Line Protocol flow, then compare the CSV export/import and CLI or line-protocol ingestion paths. Trace where the supplied timestamp is parsed and converted; done means the example remains Thu May 02 2019 16:12:41 GMT+0000 through each path without shifting, including re-import.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.