From 5823eec46ffba4255435464d6858d41117ce7059 Mon Sep 17 00:00:00 2001 From: Shreyas Siravara Date: Mon, 21 Sep 2015 16:07:39 -0700 Subject: 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 Reviewed-on: https://review.gluster.org/16337 Reviewed-by: Kevin Vigor CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Smoke: Gluster Build System --- libglusterfs/src/common-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/common-utils.h') 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); -- cgit