Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
f8110a89
Commit
f8110a89
authored
Nov 29, 2016
by
Stéphane Graber
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1334 from brauner/2016-11-29/correct_date_formatting
log: make sure that date is correctly formatted
parents
f024b716
9d7468fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
log.c
src/lxc/log.c
+3
-2
No files found.
src/lxc/log.c
View file @
f8110a89
...
@@ -224,8 +224,9 @@ int lxc_unix_epoch_to_utc(char *buf, size_t bufsize, const struct timespec *time
...
@@ -224,8 +224,9 @@ int lxc_unix_epoch_to_utc(char *buf, size_t bufsize, const struct timespec *time
/* Create final timestamp for the log and shorten nanoseconds to 3
/* Create final timestamp for the log and shorten nanoseconds to 3
* digit precision.
* digit precision.
*/
*/
ret
=
snprintf
(
buf
,
bufsize
,
"%"
PRId64
"%"
PRId64
"%"
PRId64
"%"
PRId64
ret
=
snprintf
(
buf
,
bufsize
,
"%"
PRId64
"%"
PRId64
".%.3s"
,
"%"
PRId64
"%02"
PRId64
"%02"
PRId64
"%02"
PRId64
"%02"
PRId64
"%02"
PRId64
".%.3s"
,
year
,
month
,
day
,
hours
,
minutes
,
seconds
,
nanosec
);
year
,
month
,
day
,
hours
,
minutes
,
seconds
,
nanosec
);
if
(
ret
<
0
||
(
size_t
)
ret
>=
bufsize
)
if
(
ret
<
0
||
(
size_t
)
ret
>=
bufsize
)
return
-
1
;
return
-
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