Convert calendar time to a broken-down time
#include <time.h> struct tm* gmtime_r( const time_t* timer, struct tm* result );
- A pointer to a time_t structure that contains the time that you want to convert.
- A pointer to a tm structure where the function can store the broken-down time.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
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 pointed to by result.
You typically use the date command to set the computer's internal clock using Coordinated Universal Time (UTC). Use the TZ environment variable or _CS_TIMEZONE configuration string to establish the local time zone.
A pointer to the tm structure containing the broken-down time.
Last modified: 2014-06-24