Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
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
lvzhengyang
git2
Commits
f93f3790
Commit
f93f3790
authored
Oct 31, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1924 from linquize/gmtime
Use gmtime() instead of gmtime_t()
parents
ff0ef88c
864e7271
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/log.c
+3
-3
No files found.
examples/log.c
View file @
f93f3790
...
@@ -125,7 +125,7 @@ static int add_revision(struct log_state *s, const char *revstr)
...
@@ -125,7 +125,7 @@ static int add_revision(struct log_state *s, const char *revstr)
static
void
print_time
(
const
git_time
*
intime
,
const
char
*
prefix
)
static
void
print_time
(
const
git_time
*
intime
,
const
char
*
prefix
)
{
{
char
sign
,
out
[
32
];
char
sign
,
out
[
32
];
struct
tm
intm
;
struct
tm
*
intm
;
int
offset
,
hours
,
minutes
;
int
offset
,
hours
,
minutes
;
time_t
t
;
time_t
t
;
...
@@ -142,8 +142,8 @@ static void print_time(const git_time *intime, const char *prefix)
...
@@ -142,8 +142,8 @@ static void print_time(const git_time *intime, const char *prefix)
t
=
(
time_t
)
intime
->
time
+
(
intime
->
offset
*
60
);
t
=
(
time_t
)
intime
->
time
+
(
intime
->
offset
*
60
);
gmtime_r
(
&
t
,
&
intm
);
intm
=
gmtime
(
&
t
);
strftime
(
out
,
sizeof
(
out
),
"%a %b %e %T %Y"
,
&
intm
);
strftime
(
out
,
sizeof
(
out
),
"%a %b %e %T %Y"
,
intm
);
printf
(
"%s%s %c%02d%02d
\n
"
,
prefix
,
out
,
sign
,
hours
,
minutes
);
printf
(
"%s%s %c%02d%02d
\n
"
,
prefix
,
out
,
sign
,
hours
,
minutes
);
}
}
...
...
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