Update getTimeZone to long (#8346)

This commit is contained in:
Raghav Muddur 2021-01-18 01:37:05 -08:00 committed by GitHub
parent e4d0ba933d
commit c5b13b7815
2 changed files with 3 additions and 3 deletions

View File

@ -749,7 +749,7 @@ sds getAbsolutePath(char *filename) {
* Gets the proper timezone in a more portable fashion * Gets the proper timezone in a more portable fashion
* i.e timezone variables are linux specific. * i.e timezone variables are linux specific.
*/ */
unsigned long getTimeZone(void) { long getTimeZone(void) {
#if defined(__linux__) || defined(__sun) #if defined(__linux__) || defined(__sun)
return timezone; return timezone;
#else #else
@ -758,7 +758,7 @@ unsigned long getTimeZone(void) {
gettimeofday(&tv, &tz); gettimeofday(&tv, &tz);
return tz.tz_minuteswest * 60UL; return tz.tz_minuteswest * 60L;
#endif #endif
} }

View File

@ -60,7 +60,7 @@ int string2d(const char *s, size_t slen, double *dp);
int d2string(char *buf, size_t len, double value); int d2string(char *buf, size_t len, double value);
int ld2string(char *buf, size_t len, long double value, ld2string_mode mode); int ld2string(char *buf, size_t len, long double value, ld2string_mode mode);
sds getAbsolutePath(char *filename); sds getAbsolutePath(char *filename);
unsigned long getTimeZone(void); long getTimeZone(void);
int pathIsBaseName(char *path); int pathIsBaseName(char *path);
#ifdef REDIS_TEST #ifdef REDIS_TEST