Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eefc1c47
Commit
eefc1c47
authored
Jan 22, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fake success if changing system date is a no-op.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b055830
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
time.c
dlls/ntdll/time.c
+8
-1
No files found.
dlls/ntdll/time.c
View file @
eefc1c47
...
...
@@ -951,14 +951,21 @@ NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *NewTime, LARGE_INTEGER *Old
RtlTimeToSecondsSince1970
(
NewTime
,
&
sec
);
/* fake success if time didn't change */
if
(
oldsec
==
sec
)
return
STATUS_SUCCESS
;
/* set the new time */
tv
.
tv_sec
=
sec
;
tv
.
tv_usec
=
0
;
#ifdef HAVE_SETTIMEOFDAY
tm_t
=
sec
;
if
(
!
settimeofday
(
&
tv
,
NULL
))
/* 0 is OK, -1 is error */
{
TRACE
(
"OS time changed to %s
\n
"
,
ctime
(
&
tm_t
));
return
STATUS_SUCCESS
;
tm_t
=
sec
;
}
ERR
(
"Cannot set time to %s, time adjustment %ld: %s
\n
"
,
ctime
(
&
tm_t
),
(
long
)(
sec
-
oldsec
),
strerror
(
errno
));
if
(
errno
==
EPERM
)
...
...
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