13#include <wx/datetime.h>
23 wxString::const_iterator
end;
25 if (!dt.ParseRfc822Date (dateString, &
end))
29 *time = std::chrono::system_clock::from_time_t (dt.GetTicks ());
38 wxString::const_iterator
end;
39 const wxString fmt = wxS(
"%Y%m%dT%H%M%SZ");
41 if (!dt.ParseFormat(dateString, fmt, &
end))
45 *time = std::chrono::system_clock::from_time_t (dt.GetTicks ());
53 time_t (std::chrono::duration_cast<std::chrono::seconds> (
54 timePoint.time_since_epoch ()
57 return ToUTF8 (dt.Format(
"%a, %d %b %Y %H:%M:%S %z"));
Declare functions to perform UTF-8 to std::wstring conversions.
Declare functions to work with date and time string representations.
std::string ToUTF8(const std::wstring &wstr)
bool ParseRFC822Date(const std::string &dateString, SystemTime *time)
bool ParseISO8601Date(const std::string &dateString, SystemTime *time)
std::string SerializeRFC822Date(SystemTime timePoint)
std::chrono::system_clock::time_point SystemTime
const char * end(const char *str) noexcept