]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetime.cpp
fix crash in wxExecuteModule::OnExit() (never noticed before because it wasn't execut...
[wxWidgets.git] / src / common / datetime.cpp
index d1ce06ab39e9f93001afe9ab23efeb098658db2d..39c81372eb0723a67a724749f647b42ff40bfbb4 100644 (file)
@@ -2971,7 +2971,7 @@ const wxChar *wxDateTime::ParseRfc822Date(const wxChar* date)
 
     // the spec was correct, construct the date from the values we found
     Set(day, mon, year, hour, min, sec);
-    MakeFromTimezone(TimeZone((wxDateTime_t)(offset*SEC_PER_MIN)));
+    MakeFromTimezone(TimeZone::Make(offset*SEC_PER_MIN));
 
     return p;
 }
@@ -3963,8 +3963,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
             }
             else // not a valid month name
             {
-                wday = GetWeekDayFromName(token, Name_Full | Name_Abbr);
-                if ( wday != Inv_WeekDay )
+                WeekDay wday2 = GetWeekDayFromName(token, Name_Full | Name_Abbr);
+                if ( wday2 != Inv_WeekDay )
                 {
                     // a week day
                     if ( haveWDay )
@@ -3972,6 +3972,8 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
                         break;
                     }
 
+                    wday = wday2;
+
                     haveWDay = true;
                 }
                 else // not a valid weekday name