mirror of https://github.com/gabime/spdlog.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
356 B
C++
24 lines
356 B
C++
![]()
12 years ago
|
#include "stdafx.h"
|
||
|
|
||
|
#include "c11log/details/os.h"
|
||
|
|
||
|
namespace c11log {
|
||
|
namespace details {
|
||
|
namespace os {
|
||
|
std::tm localtime(const std::time_t &time_t)
|
||
|
{
|
||
|
#ifdef _MSC_VER
|
||
|
std::tm tm;
|
||
|
localtime_s(&tm, &time_t);
|
||
|
return tm;
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
std::tm localtime()
|
||
|
{
|
||
|
std::time_t now_t = time(0);
|
||
|
return localtime(now_t);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|