Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
20ba9872
Commit
20ba9872
authored
Aug 29, 2017
by
Sven Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time-unix: split offset and leap flags into two adjtimex calls
parent
e5f91a7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
unix-time.c
time-unix/unix-time.c
+13
-5
No files found.
time-unix/unix-time.c
View file @
20ba9872
...
...
@@ -105,19 +105,27 @@ static int unix_time_set_utc_offset(struct pp_instance *ppi, int offset, int lea
t
.
status
|=
STA_INS
;
t
.
status
&=
~
STA_DEL
;
}
else
{
t
.
modes
=
MOD_STAUS
;
t
.
modes
=
MOD_STA
T
US
;
t
.
status
&=
~
STA_INS
;
t
.
status
&=
~
STA_DEL
;
}
if
(
adjtimex
(
&
t
)
<
0
)
{
pp_diag
(
ppi
,
time
,
1
,
"set UTC flags failed
\n
"
);
return
-
1
;
}
}
else
pp_diag
(
ppi
,
time
,
1
,
"get UTC
offset and flags failed
"
);
pp_diag
(
ppi
,
time
,
1
,
"get UTC
flags failed
\n
"
);
t
.
modes
|
=
MOD_TAI
;
t
.
modes
=
MOD_TAI
;
t
.
constant
=
offset
;
if
(
adjtimex
(
&
t
)
<
0
)
{
pp_diag
(
ppi
,
time
,
1
,
"set UTC offset
and flags failed
"
);
pp_diag
(
ppi
,
time
,
1
,
"set UTC offset
failed
\n
"
);
return
-
1
;
}
}
else
pp_diag
(
ppi
,
time
,
1
,
"set UTC offset to: %i
\n
"
,
offset
);
return
0
;
}
...
...
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