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 format should be reviewed #47

Open
bestchai opened this issue May 27, 2020 · 0 comments
Open

Timestamp format should be reviewed #47

bestchai opened this issue May 27, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@bestchai
Copy link
Member

bestchai commented May 27, 2020

The timestamps are currently saved in strings. But they are in a format that could be translated into a Date value. Right now we are converting them into Numbers to make operations with them but they are very large numbers and they overflow Javascript's Number format, so the results are not accurate.

E.g. in the picture below, the correct result would be 1100:

Selection_064.png

If the timestamps are generated by counting nanoseconds, i.e. it represents absolute values of nanoseconds, calculating time differences by subtracting Numbers is the right way to go. But if it's generated by date encoding, we should change it so that we perform operations on Date variables.

Action: Check with Prof. Sasha how the timestamps are generated and see if it's best to save it in a Date variable or if we can just operate in those absolute Numbers that are stored in strings.

[Issue created by mhnnunes: 2016-06-08]
[Last updated on bitbucket: 2017-04-17]

[Comment created by grahamstl: 2017-04-17]
In the current version (03f7ab9), the string timestamps are being truncated at the front (removing the first three characters of each) before doing the math in order to generate more accurate results (see the ModelGraph constructor). But if the timestamp format produces timestamps that are too short, this will not work.

The documentation simply says 'physical clock timestamp' but gives no indication for the format or units (at least not on the main page), so there is the possibility that they will use a timestamping procedure that causes this bug to appear. Ideally, our new format will take this into consideration.

@bestchai bestchai added the bug Something isn't working label May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant