Converts a time value to a structure.
#include <time.h> struct tm *gmtime (const time_t *timer); struct tm *_gmtime32(const __time32_t *timer); struct tm *_gmtime64(const __time64_t *timer); struct tm *gmtime_s(const time_t *timer, struct tm *result); struct tm *_gmtime32_s(const __time32_t *timer, struct tm *result); struct tm *_gmtime64_s(const __time64_t *timer, struct tm *result);
timer
gmtime breaks down the timer value and stores it in at TM. The structure result reflects GMT, not local time.
gmtime, mktime, and localtime use a single statically allocated structure to hold the result. Subsequent calls to these functions destroy the result of any previous call.
gmtime_s is a secure version of gmtime where a buffer to receive the result may be passed to the call.
gmtime() is a wrapper for _gmtime32() and time_t is, by default, equivalent to __time32_t. If you need to force the compiler to interpret time_t as the new 64-bit __time64_t, you can define _USE_64BIT_TIME_T. This is recommended to ensure that your application does not fail after January 18, 2038, but is not backwards-compatible with previous versions of INtime.
Similarly, gmtime_s() is a wrapper for _gmtime32_s unless _USE_64BIT_TIME_T is defined, when it is a wrapper for _gmtime64_s.
A pointer to the TM structure.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/time.h | time.h | clib.lib |
mktime, localtime, asctime, time, TIME.H for description of TM structure