X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/196be0f13767693bb514cdff5b3020fee9ca1676..1fa29bdc254c03dd5026a4b72aa8312667178121:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 9335c17f0c..45e40a6624 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -82,6 +82,23 @@ const long wxDateTime::TIME_T_FACTOR = 1000l; +#if wxUSE_EXTENDED_RTTI + +template<> void wxStringReadValue(const wxString &s , wxDateTime &data ) +{ + data.ParseFormat(s,wxT("%Y-%m-%d %H:%M:%S")) ; +} + +template<> void wxStringWriteValue(wxString &s , const wxDateTime &data ) +{ + s = data.Format(wxT("%Y-%m-%d %H:%M:%S")) ; +} + +WX_CUSTOM_TYPE_INFO(wxDateTime, wxToStringConverter , wxFromStringConverter) + +#endif + +// // ---------------------------------------------------------------------------- // conditional compilation // ----------------------------------------------------------------------------