syncstorage-rs icon indicating copy to clipboard operation
syncstorage-rs copied to clipboard

Normalize Durations and Timestamps to use a single standard chrono

Open data-sync-user opened this issue 9 months ago • 1 comments

Due to the age of the code and a number of other reasons, we often “hand craft” datetime and duration values as integers or strings instead of using well-known constants provided by existing core libraries. In addition, we also tend to use string or u64 representations of times instead of using Instance and Duration values, which can lead to errors and confusion.

We should be more consistent about how we deal with timestamps and time values.

E.g. prefer the time or chrono crate’s Duration::days(28) (which is also const) vs 28 * 24 * 60 * 60 which is a little clearer to read.

┆Issue is synchronized with this Jira Task

data-sync-user avatar Mar 27 '25 23:03 data-sync-user

➤ Taddes Korris commented:

See effort brought up post Push incident here https://mozilla-hub.atlassian.net/browse/SYNC-4521 ( https://mozilla-hub.atlassian.net/browse/SYNC-4521|smart-link )

data-sync-user avatar Mar 27 '25 23:03 data-sync-user