From 0b6ed99e50046a774a6926677cfddb46e9adeda4 Mon Sep 17 00:00:00 2001 From: icemank Date: Mon, 23 Jun 2003 15:12:49 +0000 Subject: [PATCH] Modified set_timestamp_define to use FileTimeToLocalFileTime instead of SystemTimeToTzSpecificLocalTime, since the latter is unsupported in Win 9x. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2669 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index 2b610865..15f1320b 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -62,18 +62,19 @@ char *CEXEBuild::set_timestamp_predefine(char *filename) char datebuf[128] = ""; char timebuf[128] = ""; WIN32_FIND_DATA fd; - SYSTEMTIME stime, sloctime; + FILETIME floctime; + SYSTEMTIME stime; HANDLE hSearch = FindFirstFile(filename, &fd); if (hSearch != INVALID_HANDLE_VALUE) { FindClose(hSearch); - FileTimeToSystemTime(&fd.ftLastWriteTime, &stime); - SystemTimeToTzSpecificLocalTime(0, &stime, &sloctime); + FileTimeToLocalFileTime(&fd.ftLastWriteTime, &floctime); + FileTimeToSystemTime(&floctime, &stime); - GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &sloctime, NULL, datebuf, sizeof(datebuf)); - GetTimeFormat(LOCALE_USER_DEFAULT, 0, &sloctime, NULL, timebuf, sizeof(timebuf)); + GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &stime, NULL, datebuf, sizeof(datebuf)); + GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf)); wsprintf(timestampbuf,"%s %s",datebuf,timebuf); definedlist.add("__TIMESTAMP__",timestampbuf);