| 98 | } |
| 99 | |
| 100 | std::string FormatISO8601Date(int64_t nTime) |
| 101 | { |
| 102 | const std::chrono::sys_seconds secs{std::chrono::seconds{nTime}}; |
| 103 | const auto days{std::chrono::floor<std::chrono::days>(secs)}; |
| 104 | const std::chrono::year_month_day ymd{days}; |
| 105 | return strprintf("%04i-%02u-%02u", signed{ymd.year()}, unsigned{ymd.month()}, unsigned{ymd.day()}); |
| 106 | } |
| 107 | |
| 108 | std::optional<int64_t> ParseISO8601DateTime(std::string_view str) |
| 109 | { |
no outgoing calls