diff --git a/src/oro/dateconv.cpp b/src/oro/dateconv.cpp index ce62b79..3154bd7 100644 --- a/src/oro/dateconv.cpp +++ b/src/oro/dateconv.cpp @@ -46,8 +46,14 @@ namespace { //https://howardhinnant.github.io/date/date.html#from_stream_formatting Timestamp from_json_timestamp (const std::string& str) { - //date has this format: 2020-06-19T22:33:36.855672+00:00 - return to_timestamp("%FT%T%Ez", str); + if (not str.empty() and str.back() == 'Z') { + //date has this format: 2020-06-19T22:40:51Z + return to_timestamp("%FT%TZ", str); + } + else { + //date has this format: 2020-06-19T22:33:36.855672+00:00 + return to_timestamp("%FT%T%Ez", str); + } } Timestamp from_header_timestamp (const std::string& str) {