utcTime
Functions
-
static inline time_t normalizeUtcTime(struct tm *dateTime)
Normalize a broken-down UTC date and time without using the time zone of the computer.
The fields of the structure are adjusted to a valid calendar date and time, so that for example adding seconds to
tm_secrolls over the minutes, hours, days, and years, andtm_wdayandtm_ydayare set. Unlikemktime, the structure is interpreted as UTC and not as local time.mktimeshifts the hour by one when the daylight saving flag left in the structure by an earlier call does not match the date, which happens when a date is advanced across a daylight saving transition on a computer whose time zone has one.- Parameters:
dateTime – [in,out] broken-down UTC date and time, normalized in place;
tm_isdstis set to 0- Returns:
the time in seconds since 1970-01-01 00:00:00 UTC, or -1 if it cannot be represented