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

Time stamp format #13

Open
SimonStier opened this issue Aug 29, 2024 · 2 comments
Open

Time stamp format #13

SimonStier opened this issue Aug 29, 2024 · 2 comments

Comments

@SimonStier
Copy link

Examples like

{ "value": 20.4, "time": 1619424246120 }

imply that timestamps are Unix timestamps.
Regarding the limitations (absolute range, sub-millisecond resolution) - is ISO 8601 (e.g. 2021-04-26T08:04:06.120Z also supported?

@kenwenzel
Copy link
Member

Timestamps are actually just positive integer values without any specific resolution but it is expected that they are interpreted as Unix timestamps in milliseconds resolution. For example, the Grafana datasource is relying on this interpretation.
In the context of manufacturing timestamps are often just numbers and that is one of the main reasons why the current format just uses positive integers.

It could be possible to support something like

{ "value": 20.4, "isoTime": "2021-04-26T08:04:06.120Z" }

I am not yet sure how this could safely interoperate with the current numeric representation.
It seems that IoTDB also supports some mixture of LONG and DATETIME:
https://iotdb.apache.org/UserGuide/V1.2.x/Basic-Concept/Data-Type.html#absolute-timestamp

@kenwenzel
Copy link
Member

The SQLite implementation of timestamps could also be relevant:
https://www.sqlite.org/datatype3.html#date_and_time_datatype

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