Sun Java System Web Server 7.0 Update 3 NSAPI Developer's Guide

system_gmtime() Function

The system_gmtime function is a thread-safe version of the standard gmtime function. This function returns the current time adjusted to Greenwich Mean Time.


struct tm *system_gmtime(const time_t *tp, const struct tm *res);

Return Values

A pointer to a calendar time (tm) structure containing the GMT time. Depending on your system, the pointer might point to the data item represented by the second parameter, or the pointer might point to a statically allocated item. For portability, do not assume either situation.


time_t *tp is an arithmetic time.

tm *res is a pointer to a calendar time (tm) structure.


time_t tp;
struct tm res, *resp;
tp = time(NULL);
resp = system_gmtime(&tp, &res);

See Also

system_localtime() Function, util_strftime() Function