From: Gurusamy Sarathy Date: Mon, 24 Sep 2001 18:39:58 +0000 (+0000) Subject: fix Time::HiRes implementation of gettimeofday() on windows X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7fcd0fc5f1b89986c4e176868a5363c5feb2d66d;p=p5sagit%2Fp5-mst-13.2.git fix Time::HiRes implementation of gettimeofday() on windows (HiRes.t#14 now passes) p4raw-id: //depot/perl@12184 --- diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index 97ea559..a4bf2df 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -70,13 +70,14 @@ gettimeofday (struct timeval *tp, int nothing) time_t tt; struct tm tmtm; /* mktime converts local to UTC */ - GetSystemTime (&st); + GetLocalTime (&st); tmtm.tm_sec = st.wSecond; tmtm.tm_min = st.wMinute; tmtm.tm_hour = st.wHour; tmtm.tm_mday = st.wDay; tmtm.tm_mon = st.wMonth - 1; tmtm.tm_year = st.wYear - 1900; + tmtm.tm_wday = st.wDayOfWeek; tmtm.tm_isdst = -1; tt = mktime (&tmtm); tp->tv_sec = tt;