gmtime
From cppreference.com
Defined in header <time.h>
|
||
Converts given time since epoch as time_t value into calendar time, expressed in Coordinated Universal Time (UTC).
Contents |
Parameters
time | - | pointer to a time_t object to convert |
Return value
pointer to a static internal tm object on success, or NULL otherwise. The structure may shared between gmtime, localtime, and ctime and may be overwritten on each invocation.
Notes
This function may not be thread-safe.
POSIX requires that this function sets errno to EOVERFLOW if it fails because the argument is too large.
Example
Run this code
Output:
UTC: Wed Oct 9 10:37:39 2013 local: Wed Oct 9 17:37:39 2013
See also
(C23)(C11) |
converts time since epoch to calendar time expressed as local time (function) |
C++ documentation for gmtime
|