diff --git a/ChangeLog b/ChangeLog index eeea7648d0..affa21454d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun May 15 09:57:30 2005 Nobuyoshi Nakada + + * win32/win32.c (unixtime_to_filetime): deal with DST. + [ruby-talk:141817] + Sat May 14 23:59:11 2005 Nobuyoshi Nakada * error.c (exc_exception, {exit,name_err,syserr}_initialize): call diff --git a/win32/win32.c b/win32/win32.c index aa3e94a839..cb16d30245 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3490,6 +3490,7 @@ unixtime_to_filetime(time_t time, FILETIME *ft) { struct tm *tm; SYSTEMTIME st; + FILETIME lt; tm = gmtime(&time); st.wYear = tm->tm_year + 1900; @@ -3500,7 +3501,8 @@ unixtime_to_filetime(time_t time, FILETIME *ft) st.wMinute = tm->tm_min; st.wSecond = tm->tm_sec; st.wMilliseconds = 0; - if (!SystemTimeToFileTime(&st, ft)) { + if (!SystemTimeToFileTime(&st, <) || + !LocalFileTimeToFileTime(<, ft)) { errno = map_errno(GetLastError()); return -1; }