summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShreyas Siravara <sshreyas@fb.com>2015-09-21 16:07:39 -0700
committerShreyas Siravara <sshreyas@fb.com>2017-02-10 13:51:39 -0500
commit5823eec46ffba4255435464d6858d41117ce7059 (patch)
tree3472d4e8261d145b02261bc5264ccd9bfc3ba763
parentec4d86d1a5a5b8f567e18c1c23ada4d07154bc69 (diff)
libglusterfs: Change gmtime_r -> localtime_r for better log readability
Summary: - We should be logging in our localtime, not in GMT. Makes our logs more readable. - This is a cherry-pick of D2464690 to 3.8. Signature: t1:2464690:1442877302:72fa0a0d4f26569e5641c6581c352c1de32f163e Change-Id: I046158ff91b25c8a80dd7632eece9832f691a98d Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: https://review.gluster.org/16337 Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--libglusterfs/src/common-utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 51264237ab4..5e338f69528 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -642,7 +642,7 @@ gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt)
if (timefmt_last == (gf_timefmts) - 1)
_gf_timestuff (&timefmt_last, &fmts, &zeros);
if (timefmt_last < fmt) fmt = gf_timefmt_default;
- if (utime && gmtime_r (&utime, &tm) != NULL) {
+ if (utime && localtime_r (&utime, &tm) != NULL) {
strftime (dst, sz_dst, fmts[fmt], &tm);
} else {
strncpy (dst, "N/A", sz_dst);