Converts a tm structure that expresses GMT or UTC to a binary timestamp. Format #include <utc.h> int utc_mkgmtime(*utc, *timetm, tns, *inacctm, ins) utc_t *utc; const struct tm *timetm; long tns; const struct tm *inacctm; long ins;
1 – Parameters
Input timetm A tm structure that expresses GMT. On input, tm_wday and tm_yday are ignored. tns Nanoseconds since time component. inacctm A tm structure that expresses days, hours, minutes, and seconds of inaccuracy. If tm_yday is negative, the inaccuracy is considered to be infinite. On input, tm_mday, tm_mon, tm_wday, tm_isdst, tm_gmtoff, and tm_zone are ignored. ins Nanoseconds of inaccuracy component. Output utc Resulting binary timestamp.
2 – Description
The Make Greenwich Mean Time routine converts a tm structure that expresses GMT or UTC to a binary timestamp. Additional inputs include nanoseconds since the last second of time and nanoseconds of inaccuracy.
3 – Returns
0 Indicates that the routine executed successfully. -1 Indicates an invalid time argument or invalid results.
4 – Example
See the sample program for the utc_cmpintervaltime routine.
5 – Related Functions
utc_gmtime