fmt::gmtime

gmtime overloads

Synopses

Declared in <fmt/chrono.h>

Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Universal Time (UTC). Unlike std::gmtime, this function is thread-safe on most platforms.

tm
gmtime(time_t time);
» more...

Converts given system-clock time point into calendar time, expressed in Coordinated Universal Time (UTC).

template<typename Duration>
tm
gmtime(sys_time<Duration> time_point);
» more...

Return Value

The corresponding calendar time in UTC.

Parameters

NameDescription
timeThe time since epoch to convert.
time_pointThe time point to convert.