Fix wxDateTime::ParseFormat() when matching TZ offset and in DST
Don't skip MakeFromTimeZone() for the current time zone, this is still necessary. Fixes a failure in the unit tests when running during a DST period with TZ=Europe/London, for example. Closes https://github.com/wxWidgets/wxWidgets/pull/966
This commit is contained in:
@@ -106,6 +106,7 @@ All:
|
|||||||
- Fix problem with wx-config installation and use under NetBSD (wiz).
|
- Fix problem with wx-config installation and use under NetBSD (wiz).
|
||||||
- Avoid spurious errors on thread creation under NetBSD.
|
- Avoid spurious errors on thread creation under NetBSD.
|
||||||
- Improve high DPI support in wxAui (Simon Rozman).
|
- Improve high DPI support in wxAui (Simon Rozman).
|
||||||
|
- Fix a bug with parsing time zones in wxDateTime::ParseFormat() (evileye).
|
||||||
|
|
||||||
All (GUI):
|
All (GUI):
|
||||||
|
|
||||||
|
@@ -1647,12 +1647,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
|||||||
|
|
||||||
Set(tm);
|
Set(tm);
|
||||||
|
|
||||||
// If a time zone was specified and it is not the local time zone, we need
|
if ( haveTimeZone )
|
||||||
// to shift the time accordingly.
|
|
||||||
//
|
|
||||||
// Note that avoiding the call to MakeFromTimeZone is necessary to avoid
|
|
||||||
// DST problems.
|
|
||||||
if ( haveTimeZone && timeZone != -wxGetTimeZone() )
|
|
||||||
MakeFromTimezone(timeZone);
|
MakeFromTimezone(timeZone);
|
||||||
|
|
||||||
// finally check that the week day is consistent -- if we had it
|
// finally check that the week day is consistent -- if we had it
|
||||||
|
Reference in New Issue
Block a user