aboutsummaryrefslogtreecommitdiff
path: root/libs/base/gmtime.cpp
blob: 6c3ea25f68b151ccd12c61ae8e56bc9e49f0a4cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "base/gmtime.hpp"

#include "std/target_os.hpp"

namespace base
{
std::tm GmTime(time_t time)
{
  std::tm result{};
#ifndef OMIM_OS_WINDOWS
  gmtime_r(&time, &result);
#else
  gmtime_s(&result, &time);
#endif
  return result;
}
}  // namespace base