Fix FILETIME <-> wxDateTime conversions while DST is in effect in wxMSW.

The result was (consistently, so the tests still passed) off by an hour when
the program was ran while DST was in effect. Fix this by avoiding the use of
FileTimeToLocalFileTime() and LocalFileTimeToFileTime() and just directly
converting FILETIME values to wxDateTime. Not only this is more correct but
it's also simpler and more efficient as well.

Also add a unit test for wxFileName::SetTimes() too.

Closes #13098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-06 18:21:10 +00:00
parent 416d505ee9
commit 55ab731681
3 changed files with 41 additions and 34 deletions

View File

@@ -711,6 +711,7 @@ wxMSW:
- Fix filter checks in wxDir::FindFirst/Next() (Catalin Raceanu).
- Add support for wxICON_AUTH_NEEDED to wxMessageDialog (Chris Spencer).
- Fix printing too many copies of the document in some cases (John Roberts).
- Fix DST confusion in wxFileName::{Set,Get}Times().
wxOSX/Cocoa: