| 1234567891011121314151617181920212223 |
- #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(¤t_time);
- struct std::tm *timeinfo = std::localtime(¤t_time);
- return timeinfo->tm_gmtoff;
- }
- } // namespace Util
- } // namespace DataStorageInterface
|