gmtime, gmtime_r

Converts calendar time into Coordinated Universal Time (UTC)

Local Servers:nonblocking
Remote Servers:N/A
Service:Time/Date Manipulation


  #include <time.h>  
  struct tm *gmtime  (  
     const time_t  *timer);
  #include <time.h>  
  struct tm *gmtime_r  (  
    const time_t   *timer,   
    struct tm      *timeP);


(IN) Points to the calendar time to convert to UTC.
(OUT) Points to the converted string.

Return Values

Returns a pointer to a structure containing the broken-down time.


gmtime, gmtime_r converts the calendar time pointed to by the timer parameter into a broken-down time, expressed as UTC.

Use the NetWare® console command SET TIME to set the date and time kept by the server. Refer to the NetWare 386 System Administration manual for more information on this command.

The structure returned is reused every time that gmtime, gmtime_r is called.

gmtime_r provides the same functionality as gmtime, but gmtime_r is designed for use with reentrant NLMs. gmtime_r provides that the caller pass storage for the results rather than relying on per-thread data. gmtime_r is supported only in CLIB V 4.11 or above.

See Also

asctime, asctime_r, clock, ctime, ctime_r, difftime, localtime, localtime_r, mktime, strftime, time