| 77 | } |
| 78 | |
| 79 | std::string FormatISO8601DateTime(int64_t nTime) { |
| 80 | struct tm ts; |
| 81 | time_t time_val = nTime; |
| 82 | #ifdef _MSC_VER |
| 83 | gmtime_s(&ts, &time_val); |
| 84 | #else |
| 85 | gmtime_r(&time_val, &ts); |
| 86 | #endif |
| 87 | 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); |
| 88 | } |
| 89 | |
| 90 | std::string FormatISO8601Date(int64_t nTime) { |
| 91 | struct tm ts; |
no outgoing calls