| 93 | } |
| 94 | |
| 95 | std::string FormatISO8601DateTime(int64_t nTime) { |
| 96 | struct tm ts; |
| 97 | time_t time_val = nTime; |
| 98 | #ifdef _MSC_VER |
| 99 | gmtime_s(&ts, &time_val); |
| 100 | #else |
| 101 | gmtime_r(&time_val, &ts); |
| 102 | #endif |
| 103 | return strprintf("%04i-%02i-%02iT%02i:%02i:%02iZ", ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec); |
| 104 | } |
| 105 | |
| 106 | std::string FormatISO8601Date(int64_t nTime) { |
| 107 | struct tm ts; |
no outgoing calls
no test coverage detected