const SHIFT_FROM_UNIX_TIME_TO_MARCH_Y2K: i64 = _; // 951_868_800i64
Expand description
A shift (in seconds) from the Unix epoch (1970-01-01 00:00:00) to a base date that is a multiple of a 400-year leap cycle.
Used in Instant
-> UtcDateTime
conversion.
The date we’re using is 2000-03-01 00:00:00
, for two reasons:
- It’s a multiple of 400, to make it easier to work with leap years
- We’re also shifting the month to 1st March, so that the extra day on leap years is added to the last month (Feb), not in the middle of a year (makes some calculations easier)