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:
parent
394b26bc36
commit
28f7e6130d
@ -106,6 +106,7 @@ All:
|
||||
- Fix problem with wx-config installation and use under NetBSD (wiz).
|
||||
- Avoid spurious errors on thread creation under NetBSD.
|
||||
- Improve high DPI support in wxAui (Simon Rozman).
|
||||
- Fix a bug with parsing time zones in wxDateTime::ParseFormat() (evileye).
|
||||
|
||||
All (GUI):
|
||||
|
||||
|
@ -1647,12 +1647,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
||||
|
||||
Set(tm);
|
||||
|
||||
// If a time zone was specified and it is not the local time zone, we need
|
||||
// to shift the time accordingly.
|
||||
//
|
||||
// Note that avoiding the call to MakeFromTimeZone is necessary to avoid
|
||||
// DST problems.
|
||||
if ( haveTimeZone && timeZone != -wxGetTimeZone() )
|
||||
if ( haveTimeZone )
|
||||
MakeFromTimezone(timeZone);
|
||||
|
||||
// finally check that the week day is consistent -- if we had it
|
||||
|
Loading…
Reference in New Issue
Block a user