summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Db_autobackups/src/zip.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Db_autobackups/src/zip.cpp b/plugins/Db_autobackups/src/zip.cpp
index 4952cedc20..cd3e0187ef 100644
--- a/plugins/Db_autobackups/src/zip.cpp
+++ b/plugins/Db_autobackups/src/zip.cpp
@@ -12,11 +12,12 @@ int CreateZipFile(const wchar_t *szDestPath, OBJLIST<ZipFile> &lstFiles, const s
for (auto &zf : lstFiles) {
HANDLE hSrcFile = CreateFileW(zf->sPath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
if (hSrcFile != INVALID_HANDLE_VALUE) {
- FILETIME ft;
+ FILETIME ft, ft2;
GetFileTime(hSrcFile, 0, &ft, 0);
+ FileTimeToLocalFileTime(&ft, &ft2);
WORD dosDate, dosTime;
- FileTimeToDosDateTime(&ft, &dosDate, &dosTime);
+ FileTimeToDosDateTime(&ft2, &dosDate, &dosTime);
fi.dosDate = MAKELONG(dosTime, dosDate);
int iOpenRes = zipOpenNewFileInZip(hZip, _T2A(zf->sZipPath.c_str()), &fi, nullptr, 0, nullptr, 0, "", Z_DEFLATED, Z_BEST_COMPRESSION);