Initial commit

This commit is contained in:
2020-05-01 11:27:56 +02:00
commit 2c6c03869c
38 changed files with 1576 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "Util.h"
#include <algorithm>
#include <ctime>
namespace DataStorageInterface {
namespace Util {
int GetTimestamp()
{
return std::time(nullptr);
}
int GetUTCOffset()
{
std::time_t current_time;
std::time(&current_time);
struct std::tm *timeinfo = std::localtime(&current_time);
return timeinfo->tm_gmtoff;
}
} // namespace Util
} // namespace DataStorageInterface