Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c9a74368
Commit
c9a74368
authored
Dec 10, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fixed mkgmtime and _mkgmtime64 implementation.
parent
a66ed048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
time.c
dlls/msvcrt/time.c
+3
-27
No files found.
dlls/msvcrt/time.c
View file @
c9a74368
...
...
@@ -348,32 +348,7 @@ MSVCRT___time32_t CDECL MSVCRT_mktime(struct MSVCRT_tm *mstm)
*/
MSVCRT___time64_t
CDECL
MSVCRT__mkgmtime64
(
struct
MSVCRT_tm
*
time
)
{
SYSTEMTIME
st
;
FILETIME
ft
;
MSVCRT___time64_t
ret
;
int
i
;
st
.
wMilliseconds
=
0
;
st
.
wSecond
=
time
->
tm_sec
;
st
.
wMinute
=
time
->
tm_min
;
st
.
wHour
=
time
->
tm_hour
;
st
.
wDay
=
time
->
tm_mday
;
st
.
wMonth
=
time
->
tm_mon
+
1
;
st
.
wYear
=
time
->
tm_year
+
1900
;
if
(
!
SystemTimeToFileTime
(
&
st
,
&
ft
))
return
-
1
;
FileTimeToSystemTime
(
&
ft
,
&
st
);
time
->
tm_wday
=
st
.
wDayOfWeek
;
for
(
i
=
time
->
tm_yday
=
0
;
i
<
st
.
wMonth
-
1
;
i
++
)
time
->
tm_yday
+=
MonthLengths
[
IsLeapYear
(
st
.
wYear
)][
i
];
time
->
tm_yday
+=
st
.
wDay
-
1
;
ret
=
((
MSVCRT___time64_t
)
ft
.
dwHighDateTime
<<
32
)
+
ft
.
dwLowDateTime
;
ret
=
(
ret
-
TICKS_1601_TO_1970
)
/
TICKSPERSEC
;
return
ret
;
return
mktime_helper
(
time
,
FALSE
);
}
/**********************************************************************
...
...
@@ -381,7 +356,8 @@ MSVCRT___time64_t CDECL MSVCRT__mkgmtime64(struct MSVCRT_tm *time)
*/
MSVCRT___time32_t
CDECL
MSVCRT__mkgmtime32
(
struct
MSVCRT_tm
*
time
)
{
return
MSVCRT__mkgmtime64
(
time
);
MSVCRT___time64_t
ret
=
MSVCRT__mkgmtime64
(
time
);
return
ret
==
(
MSVCRT___time32_t
)
ret
?
ret
:
-
1
;
}
/**********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment