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
864e7271
Commit
864e7271
authored
Oct 31, 2013
by
Linquize
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use gmtime() instead of gmtime_t()
The latter is not available on Windows
parent
ff0ef88c
Hide 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 @
864e7271
...
...
@@ -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
)
{
char
sign
,
out
[
32
];
struct
tm
intm
;
struct
tm
*
intm
;
int
offset
,
hours
,
minutes
;
time_t
t
;
...
...
@@ -142,8 +142,8 @@ static void print_time(const git_time *intime, const char *prefix)
t
=
(
time_t
)
intime
->
time
+
(
intime
->
offset
*
60
);
gmtime_r
(
&
t
,
&
intm
);
strftime
(
out
,
sizeof
(
out
),
"%a %b %e %T %Y"
,
&
intm
);
intm
=
gmtime
(
&
t
);
strftime
(
out
,
sizeof
(
out
),
"%a %b %e %T %Y"
,
intm
);
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