16 int64_t daysElapsed = seconds / 86400;
17 int32_t secondsOfDay = seconds % 86400;
23 if (daysElapsed < daysInYear)
27 daysElapsed -= daysInYear;
44 buf->
tm_hour = secondsOfDay / 3600;
45 buf->
tm_min = (secondsOfDay % 3600) / 60;
46 buf->
tm_sec = secondsOfDay % 60;
48 buf->
tm_wday = (daysElapsed + 4) % 7;