#include "format.h"
#include <ctime>
#include <locale>
Go to the source code of this file.
std::tm gmtime |
( |
std::time_t |
time | ) |
|
|
inline |
Definition at line 67 of file time.h.
72 dispatcher(std::time_t
t): time_(t) {}
75 using namespace fmt::internal;
76 return handle(
gmtime_r(&time_, &tm_));
79 bool handle(std::tm *tm) {
return tm !=
FMT_NULL; }
82 using namespace fmt::internal;
83 return fallback(
gmtime_s(&tm_, &time_));
86 bool fallback(
int res) {
return res == 0; }
std::tm gmtime(std::time_t time)
std::tm localtime |
( |
std::time_t |
time | ) |
|
|
inline |
Definition at line 29 of file time.h.
34 dispatcher(std::time_t
t): time_(t) {}
37 using namespace fmt::internal;
38 return handle(localtime_r(&time_, &tm_));
41 bool handle(std::tm *tm) {
return tm !=
FMT_NULL; }
44 using namespace fmt::internal;
48 bool fallback(
int res) {
return res == 0; }
52 using namespace fmt::internal;
std::tm localtime(std::time_t time)