X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5dfe6069995ce68904ea619fb6a60fa0cfecddc9..ee682a94cb9ea835c9b74a12f17b0fb63f43dcce:/src/common/variant.cpp diff --git a/src/common/variant.cpp b/src/common/variant.cpp index defe41807f..48d54c7ec1 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -2244,9 +2244,11 @@ bool wxVariant::Convert(wxDateTime* value) const { wxString type(GetType()); if (type == wxT("datetime")) + { *value = ((wxVariantDataDateTime*)GetData())->GetValue(); - else - return FALSE; - - return TRUE; + return TRUE; + } + // Fallback to string conversion + wxString val; + return Convert(&val) && (value->ParseDate(val)); }