fix(time): nsec should be explicitly cast to uint32

This commit is contained in:
phaneron 2023-07-30 04:51:38 -04:00
parent 5cf50be7e2
commit ee0277da1b

View file

@ -195,7 +195,7 @@ void BreakTime(Timestamp timestamp, TimeRec& date) {
date.sec = static_cast<uint32_t>(systemTime.wSecond);
date.wday = static_cast<uint32_t>(systemTime.wDayOfWeek);
date.year = static_cast<uint32_t>(systemTime.wYear);
date.nsec = nsec;
date.nsec = static_cast<uint32_t>(nsec);
bool leapYear = (date.year % 400 == 0) || (date.year % 100 != 0 && ((systemTime.wYear & 3) == 0));