Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
7a3012cc
Commit
7a3012cc
authored
Jul 15, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Rename timegm as nghttp2_timegm
parent
ba31b990
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
src/timegm.c
src/timegm.c
+1
-1
src/timegm.h
src/timegm.h
+1
-1
src/util.cc
src/util.cc
+3
-3
No files found.
src/timegm.c
View file @
7a3012cc
...
...
@@ -34,7 +34,7 @@ static int count_leap_year(int y) {
}
/* Based on the algorithm of Python 2.7 calendar.timegm. */
time_t
timegm
(
struct
tm
*
tm
)
{
time_t
nghttp2_
timegm
(
struct
tm
*
tm
)
{
int
days
;
int
num_leap_year
;
int64_t
t
;
...
...
src/timegm.h
View file @
7a3012cc
...
...
@@ -37,7 +37,7 @@ extern "C" {
#include <time.h>
#endif // HAVE_TIME_H
time_t
timegm
(
struct
tm
*
tm
);
time_t
nghttp2_
timegm
(
struct
tm
*
tm
);
#ifdef __cplusplus
}
...
...
src/util.cc
View file @
7a3012cc
...
...
@@ -278,7 +278,7 @@ std::string common_log_date(time_t t) {
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
auto
gmtoff
=
tms
.
tm_gmtoff
;
#else // !HAVE_STRUCT_TM_TM_GMTOFF
auto
gmtoff
=
timegm
(
&
tms
)
-
t
;
auto
gmtoff
=
nghttp2_
timegm
(
&
tms
)
-
t
;
#endif // !HAVE_STRUCT_TM_TM_GMTOFF
if
(
gmtoff
>=
0
)
{
*
p
++
=
'+'
;
...
...
@@ -326,7 +326,7 @@ std::string iso8601_date(int64_t ms) {
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
auto
gmtoff
=
tms
.
tm_gmtoff
;
#else // !HAVE_STRUCT_TM_TM_GMTOFF
auto
gmtoff
=
timegm
(
&
tms
)
-
sec
;
auto
gmtoff
=
nghttp2_
timegm
(
&
tms
)
-
sec
;
#endif // !HAVE_STRUCT_TM_TM_GMTOFF
if
(
gmtoff
==
0
)
{
*
p
++
=
'Z'
;
...
...
@@ -354,7 +354,7 @@ time_t parse_http_date(const std::string &s) {
if
(
r
==
0
)
{
return
0
;
}
return
timegm
(
&
tm
);
return
nghttp2_
timegm
(
&
tm
);
}
namespace
{
...
...
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