projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dee7ff
)
fix Time::HiRes implementation of gettimeofday() on windows
author
Gurusamy Sarathy
<gsar@cpan.org>
Mon, 24 Sep 2001 18:39:58 +0000
(18:39 +0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Mon, 24 Sep 2001 18:39:58 +0000
(18:39 +0000)
(HiRes.t#14 now passes)
p4raw-id: //depot/perl@12184
ext/Time/HiRes/HiRes.xs
patch
|
blob
|
history
diff --git
a/ext/Time/HiRes/HiRes.xs
b/ext/Time/HiRes/HiRes.xs
index
97ea559
..
a4bf2df
100644
(file)
--- 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 */
- Get
System
Time (&st);
+ Get
Local
Time (&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;