summaryrefslogtreecommitdiff
path: root/ext/Time
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2001-09-24 18:39:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>2001-09-24 18:39:58 +0000
commit644fba84fa487012b388be0c51b7254f1320fe0e (patch)
tree1fd54abe6a6eaedd025770ed18e0bce5d0e15b4a /ext/Time
parent25a26406fa0b8a387964064bce977ad14ac7b4d9 (diff)
downloadperl-644fba84fa487012b388be0c51b7254f1320fe0e.tar.gz
fix Time::HiRes implementation of gettimeofday() on windows
(HiRes.t#14 now passes) p4raw-id: //depot/perl@12184
Diffstat (limited to 'ext/Time')
-rw-r--r--ext/Time/HiRes/HiRes.xs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs
index 97ea55983f..a4bf2dfd0d 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;