See title. Was just going to just migrate serverdata and update time sourcing logic, but ran into a ton of bugs with ClientData using millisecond timestamps that would require refactoring every instantiation of the struct. So I said fug it and switched the struct to store a DateTime so any caller can pass in precise time. This DateTime is also how the prisma layer understands time. All times utc!!
Also switched the internal data representation to f32 from string because it was really annoying me all of the mapping and parsing back and forth we do. This can be reverted no biggie.
Works live and query when falling back to system time
[ ] Need to test falling back to MQTT time
Checklist
It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
[ ] All commits are tagged with the ticket number
[ ] No linting errors / newline at end of file warnings
[X] All code follows repository-configured prettier formatting
[X] No merge conflicts
[X] All checks passing
[X] Remove any non-applicable sections of this template
[X] Assign the PR to yourself
[X] No package-lock.json changes (unless dependencies have changed)
[X] Request reviewers & ping on Slack
[X] PR is linked to the ticket (fill in the closes line below)
Changes
See title. Was just going to just migrate serverdata and update time sourcing logic, but ran into a ton of bugs with
ClientData
using millisecond timestamps that would require refactoring every instantiation of the struct. So I said fug it and switched the struct to store aDateTime
so any caller can pass in precise time. ThisDateTime
is also how the prisma layer understands time. All times utc!!Also switched the internal data representation to f32 from string because it was really annoying me all of the mapping and parsing back and forth we do. This can be reverted no biggie.
Test Cases
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs. Please review the contributor guide and reach out to your Tech Lead if anything is unclear. Please request reviewers and ping on slack only after you've gone through this whole checklist.package-lock.json
changes (unless dependencies have changed)