diff --git a/tz.h b/tz.h index eec9ed9..5942838 100644 --- a/tz.h +++ b/tz.h @@ -1150,7 +1150,7 @@ tai_clock::utc_to_tai(utc_time t) using namespace std::chrono; using duration = typename std::common_type::type; return tai_time{t.time_since_epoch()} + - (sys_days{1970_y/jan/1} - sys_days{1958_y/jan/1} + seconds{10}); + (sys_days{year{1970}/jan/1} - sys_days{year{1958}/jan/1} + seconds{10}); } template @@ -1160,7 +1160,7 @@ tai_clock::tai_to_utc(tai_time t) using namespace std::chrono; using duration = typename std::common_type::type; return utc_time{t.time_since_epoch()} - - (sys_days{1970_y/jan/1} - sys_days{1958_y/jan/1} + seconds{10}); + (sys_days{year{1970}/jan/1} - sys_days{year{1958}/jan/1} + seconds{10}); } template @@ -1194,7 +1194,7 @@ operator<<(std::basic_ostream& os, const tai_time& t) using namespace std::chrono; using duration = typename std::common_type::type; auto tp = sys_time{t.time_since_epoch()} - - (sys_days{1970_y/jan/1} - sys_days{1958_y/jan/1}); + (sys_days{year{1970}/jan/1} - sys_days{year{1958}/jan/1}); return os << tp; } @@ -1235,7 +1235,7 @@ gps_clock::utc_to_gps(utc_time t) using namespace std::chrono; using duration = typename std::common_type::type; return gps_time{t.time_since_epoch()} - - (sys_days{1980_y/jan/sun[1]} - sys_days{1970_y/jan/1} + seconds{9}); + (sys_days{year{1980}/jan/sun[1]} - sys_days{year{1970}/jan/1} + seconds{9}); } template @@ -1245,7 +1245,7 @@ gps_clock::gps_to_utc(gps_time t) using namespace std::chrono; using duration = typename std::common_type::type; return utc_time{t.time_since_epoch()} + - (sys_days{1980_y/jan/sun[1]} - sys_days{1970_y/jan/1} + seconds{9}); + (sys_days{year{1980}/jan/sun[1]} - sys_days{year{1970}/jan/1} + seconds{9}); } template @@ -1279,7 +1279,7 @@ operator<<(std::basic_ostream& os, const gps_time& t) using namespace std::chrono; using duration = typename std::common_type::type; auto tp = sys_time{t.time_since_epoch()} + - (sys_days{1980_y/jan/sun[1]} - sys_days{1970_y/jan/1}); + (sys_days{year{1980}/jan/sun[1]} - sys_days{year{1970}/jan/1}); return os << tp; }