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
ea0e7b33
Commit
ea0e7b33
authored
Feb 11, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: localtime should accept any positive time value.
parent
b4b3e6a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
time.c
dlls/msvcrt/time.c
+5
-3
No files found.
dlls/msvcrt/time.c
View file @
ea0e7b33
...
...
@@ -152,8 +152,12 @@ struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs)
SYSTEMTIME
st
;
DWORD
tzid
;
TIME_ZONE_INFORMATION
tzinfo
;
ULONGLONG
time
;
ULONGLONG
time
=
*
secs
*
(
ULONGLONG
)
TICKSPERSEC
+
TICKS_1601_TO_1970
;
/* time < 0 means a date before midnight of January 1, 1970 */
if
(
*
secs
<
0
)
return
NULL
;
time
=
*
secs
*
(
ULONGLONG
)
TICKSPERSEC
+
TICKS_1601_TO_1970
;
ft
.
dwHighDateTime
=
(
UINT
)(
time
>>
32
);
ft
.
dwLowDateTime
=
(
UINT
)
time
;
...
...
@@ -161,8 +165,6 @@ struct MSVCRT_tm* MSVCRT_localtime(const MSVCRT_time_t* secs)
FileTimeToLocalFileTime
(
&
ft
,
&
lft
);
FileTimeToSystemTime
(
&
lft
,
&
st
);
if
(
st
.
wYear
<
1970
)
return
NULL
;
data
->
time_buffer
.
tm_sec
=
st
.
wSecond
;
data
->
time_buffer
.
tm_min
=
st
.
wMinute
;
data
->
time_buffer
.
tm_hour
=
st
.
wHour
;
...
...
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