Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
366a16ff
Unverified
Commit
366a16ff
authored
Jan 18, 2021
by
Raghav Muddur
Committed by
GitHub
Jan 18, 2021
Browse files
Update getTimeZone to long (#8346)
parent
522d9360
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/util.c
View file @
366a16ff
...
...
@@ -749,7 +749,7 @@ sds getAbsolutePath(char *filename) {
* Gets the proper timezone in a more portable fashion
* i.e timezone variables are linux specific.
*/
unsigned
long
getTimeZone
(
void
)
{
long
getTimeZone
(
void
)
{
#if defined(__linux__) || defined(__sun)
return
timezone
;
#else
...
...
@@ -758,7 +758,7 @@ unsigned long getTimeZone(void) {
gettimeofday
(
&
tv
,
&
tz
);
return
tz
.
tz_minuteswest
*
60
U
L
;
return
tz
.
tz_minuteswest
*
60L
;
#endif
}
...
...
src/util.h
View file @
366a16ff
...
...
@@ -60,7 +60,7 @@ int string2d(const char *s, size_t slen, double *dp);
int
d2string
(
char
*
buf
,
size_t
len
,
double
value
);
int
ld2string
(
char
*
buf
,
size_t
len
,
long
double
value
,
ld2string_mode
mode
);
sds
getAbsolutePath
(
char
*
filename
);
unsigned
long
getTimeZone
(
void
);
long
getTimeZone
(
void
);
int
pathIsBaseName
(
char
*
path
);
#ifdef REDIS_TEST
...
...
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