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
5910c681
Commit
5910c681
authored
Aug 04, 1999
by
Andreas Mohr
Committed by
Alexandre Julliard
Aug 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented SetLocalTime.
parent
0e65a49b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
kernel32.spec
relay32/kernel32.spec
+1
-1
time.c
win32/time.c
+30
-8
No files found.
relay32/kernel32.spec
View file @
5910c681
...
...
@@ -671,7 +671,7 @@ import ntdll.dll
652 stdcall SetHandleCount(long) SetHandleCount
653 stdcall SetHandleInformation(long long long) SetHandleInformation
654 stdcall SetLastError(long) SetLastError
655 st
ub
SetLocalTime
655 st
dcall SetLocalTime(ptr)
SetLocalTime
656 stdcall SetLocaleInfoA(long long str) SetLocaleInfoA
657 stub SetLocaleInfoW
658 stub SetMailslotInfo
...
...
win32/time.c
View file @
5910c681
...
...
@@ -37,6 +37,35 @@ VOID WINAPI GetLocalTime(LPSYSTEMTIME systime)
systime
->
wMilliseconds
=
(
tv
.
tv_usec
/
1000
)
%
1000
;
}
/***********************************************************************
* SetLocalTime (KERNEL32.655)
*
* FIXME: correct ? Is the timezone param of settimeofday() needed ?
* I don't have any docu about SetLocal/SystemTime(), argl...
*/
VOID
WINAPI
SetLocalTime
(
LPSYSTEMTIME
systime
)
{
struct
timeval
tv
;
struct
tm
t
;
time_t
sec
;
/* get the number of seconds */
t
.
tm_sec
=
systime
->
wSecond
;
t
.
tm_min
=
systime
->
wMinute
;
t
.
tm_hour
=
systime
->
wHour
;
t
.
tm_mday
=
systime
->
wDay
;
t
.
tm_mon
=
systime
->
wMonth
;
t
.
tm_year
=
systime
->
wYear
;
sec
=
mktime
(
&
t
);
/* set the new time */
tv
.
tv_sec
=
sec
;
tv
.
tv_usec
=
systime
->
wMilliseconds
*
1000
;
return
!
settimeofday
(
&
tv
,
NULL
);
}
/***********************************************************************
* GetSystemTime (KERNEL32.285)
*/
...
...
@@ -86,14 +115,7 @@ BOOL WINAPI SetSystemTime(const SYSTEMTIME *systime)
/* set the new time */
tv
.
tv_sec
=
sec
;
tv
.
tv_usec
=
systime
->
wMilliseconds
*
1000
;
if
(
settimeofday
(
&
tv
,
&
tz
))
{
return
FALSE
;
}
else
{
return
TRUE
;
}
return
!
settimeofday
(
&
tv
,
&
tz
);
}
...
...
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