Skip to content

Commit

Permalink
tests: improve qzss coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres committed May 21, 2023
1 parent 26ba849 commit e85c7b9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,13 @@ fn test_time_of_week() {
epoch_utc
);

// GPST and QZSST share the same properties at all times
let epoch_qzsst = epoch.in_time_scale(TimeScale::QZSST);
assert_eq!(epoch.to_gregorian_utc(), epoch_qzsst.to_gregorian_utc());

let gps_qzss_offset = TimeScale::GPST.ref_epoch() - TimeScale::QZSST.ref_epoch();
assert_eq!(gps_qzss_offset.total_nanoseconds(), 0); // no offset

// 06/01/1980 01:00:00 = 1H into GPST <=> (0, 3_618_000_000_000)
let epoch = Epoch::from_time_of_week(0, 3_618_000_000_000, TimeScale::GPST);
assert_eq!(epoch.to_gregorian_utc(), (1980, 01, 06, 01, 00, 0 + 18, 00));
Expand Down

0 comments on commit e85c7b9

Please sign in to comment.