From c5b13b7815c26c79a6a4e6f89939471866e592c6 Mon Sep 17 00:00:00 2001 From: Raghav Muddur Date: Mon, 18 Jan 2021 01:37:05 -0800 Subject: [PATCH] Update getTimeZone to long (#8346) --- src/util.c | 4 ++-- src/util.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.c b/src/util.c index eca212e57..3243fa51e 100644 --- a/src/util.c +++ b/src/util.c @@ -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 * 60UL; + return tz.tz_minuteswest * 60L; #endif } diff --git a/src/util.h b/src/util.h index e9ad0ee4d..feaa82924 100644 --- a/src/util.h +++ b/src/util.h @@ -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