]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetimefmt.cpp
Fix focus at the end of a property label edit (needed at least for wxGTK)
[wxWidgets.git] / src / common / datetimefmt.cpp
index cf02a55357e2b4955f8bcc881755fc8e973ce88c..bf920165252fc7c7bf71a74fd65a8664864c4288 100644 (file)
@@ -1497,10 +1497,9 @@ wxDateTime::ParseDateTime(const wxString& date, wxString::const_iterator *end)
 {
     wxCHECK_MSG( end, false, "end iterator pointer must be specified" );
 
-    // Set to current day and hour, so strings like '14:00' becomes today at
-    // 14, not some other random date
-    wxDateTime dtDate = wxDateTime::Today();
-    wxDateTime dtTime = wxDateTime::Today();
+    wxDateTime
+        dtDate,
+        dtTime;
 
     wxString::const_iterator
         endTime,
@@ -1941,7 +1940,7 @@ wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end)
         "%I:%M:%S %p",  // 12hour with AM/PM
         "%H:%M:%S",     // could be the same or 24 hour one so try it too
         "%I:%M %p",     // 12hour with AM/PM but without seconds
-        "%H:%M:%S",     // and a possibly 24 hour version without seconds
+        "%H:%M",        // and a possibly 24 hour version without seconds
         "%X",           // possibly something from above or maybe something
                         // completely different -- try it last