Skip to content

C:gmtime

Convert time_t to tm as UTC time.

struct tm * gmtime (const time_t * timer);

Data races

The function accesses the object pointed by timer.

The function also accesses and modifies a shared internal object, which may introduce data races on concurrent calls to gmtime and localtime. Some libraries provide an alternative function that avoids this data race: gmtime_r (non-portable).

Favorite site