Format
#include <time.h>
struct tm *gmtime64_r(const time64_t *time, struct tm *result);
Language Level: ILE C Extension
Threadsafe: Yes.
Description
This function is the restartable version of gmtime64().
The gmtime64_r() function breaks down the time value, in seconds, and stores it in result. result is a pointer to the tm structure, defined in <time.h>. The value time is usually obtained by a call to the time64() function.
The fields of the tm structure include:
Return Value
The gmtime64_r() function returns a pointer to the resulting tm structure.
Example that uses gmtime64_r()
This example uses the gmtime64_r() function to adjust a time64_t representation to a Universal Coordinate Time character string and then converts it to a printable string using the asctime_r() function.
#include <stdio.h>
#include <time.h>
int main(void)
{
time64_t ltime;
struct tm mytime;
char buf[50];
time64(<ime)
printf ("Universal Coordinate Time is %s",
asctime_r(gmtime64_r(<ime, &mytime), buf));
}
/************************ Output should be similar to: **********
Universal Coordinate Time is Wed Aug 18 21:01:44 1993
*/
Related Information