summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 1bd02efae9..e861ed39e1 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1469,24 +1469,21 @@ win32_kill(int pid, int sig)
PERL_STATIC_INLINE
time_t
translate_ft_to_time_t(FILETIME ft) {
- SYSTEMTIME st, local_st;
+ SYSTEMTIME st;
struct tm pt;
- if (!FileTimeToSystemTime(&ft, &st) ||
- !SystemTimeToTzSpecificLocalTime(NULL, &st, &local_st)) {
+ if (!FileTimeToSystemTime(&ft, &st))
return -1;
- }
Zero(&pt, 1, struct tm);
- pt.tm_year = local_st.wYear - 1900;
- pt.tm_mon = local_st.wMonth - 1;
- pt.tm_mday = local_st.wDay;
- pt.tm_hour = local_st.wHour;
- pt.tm_min = local_st.wMinute;
- pt.tm_sec = local_st.wSecond;
- pt.tm_isdst = -1;
-
- return mktime(&pt);
+ pt.tm_year = st.wYear - 1900;
+ pt.tm_mon = st.wMonth - 1;
+ pt.tm_mday = st.wDay;
+ pt.tm_hour = st.wHour;
+ pt.tm_min = st.wMinute;
+ pt.tm_sec = st.wSecond;
+
+ return _mkgmtime(&pt);
}
typedef DWORD (__stdcall *pGetFinalPathNameByHandleA_t)(HANDLE, LPSTR, DWORD, DWORD);