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

Discussion: epoch timestamps #143

Open
DanielHabenicht opened this issue Mar 14, 2021 · 3 comments
Open

Discussion: epoch timestamps #143

DanielHabenicht opened this issue Mar 14, 2021 · 3 comments

Comments

@DanielHabenicht
Copy link
Collaborator

Proposal: Use normal linux timestamps externally instead of custom timestamps. (still use our format internally)

We currently use normal epoch timestamps / 1000 in order to have more bearable date internally and in json logic.
However using them outside, e.g. in forms, you always have to convert between normal stamps and internal stamps.

@DanielHabenicht
Copy link
Collaborator Author

If the developer forgets to convert this will result in wrong result of the questionnaire

@ChristophWersal
Copy link
Collaborator

So, the difference is that Linux timestamps are in seconds, while Javascript timestamps from date.now() are in milliseconds.

If I understand you correctly, only timestamps in seconds should be used in the JSON and for the interfaces/functions of the engine, correct? I would agree.

@DanielHabenicht
Copy link
Collaborator Author

DanielHabenicht commented Mar 14, 2021

exactly so every function that is exposed externally should return timestamps in milliseconds and expect to get results in milliseconds.
It may also check if the value given is already in seconds.

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