![]() |
![]() |
![]() |
Convert calendar time to a broken-down time
#include <time.h> struct tm* gmtime_r( const time_t* timer, struct tm* result );
libc
The gmtime_r() function converts the calendar time pointed to by timer into a broken-down time, expressed as Coordinated Universal Time (UTC) (formerly known as Greenwich Mean Time or GMT) and stores it in the tm structure result.
The time set on the computer with the date command reflects Coordinated Universal Time (UTC). The environment variable TZ is used to establish the local time zone. See the section "The TZ environment variable" in the Global Data and the TZ Environment Variable chapter for a discussion of how to set the time zone.
A pointer to a structure containing the broken-down time.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
asctime(), asctime_r(), clock(), ctime(), difftime(), localtime(), localtime_r(), mktime(), strftime(), time(), tm, tzset()
![]() |
![]() |
![]() |