Format with rustfmt
All checks were successful
ci / check (push) Successful in 44s

This commit is contained in:
Jean Chevronnet 2026-07-29 19:17:16 +00:00
parent facbde55bd
commit 7846f91afe
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
11 changed files with 209 additions and 54 deletions

View file

@ -61,8 +61,14 @@ fn base64_matches_known_vectors() {
#[test]
fn server_time_parses_to_unix_seconds() {
assert_eq!(parse_server_time("1970-01-01T00:00:00.000Z"), Some(0));
assert_eq!(parse_server_time("2020-01-01T00:00:00Z"), Some(1_577_836_800));
assert_eq!(parse_server_time("2021-01-01T00:00:00.123Z"), Some(1_609_459_200));
assert_eq!(
parse_server_time("2020-01-01T00:00:00Z"),
Some(1_577_836_800)
);
assert_eq!(
parse_server_time("2021-01-01T00:00:00.123Z"),
Some(1_609_459_200)
);
assert_eq!(parse_server_time("not-a-timestamp"), None);
}