summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index aaff49416a9..39b5bea5068 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -110,7 +110,6 @@ zr_build_process_uuid ()
char tmp_str[1024] = {0,};
char hostname[256] = {0,};
struct timeval tv = {0,};
- struct tm now = {0, };
char now_str[32];
if (-1 == gettimeofday(&tv, NULL)) {
@@ -125,9 +124,8 @@ zr_build_process_uuid ()
strerror (errno));
}
- localtime_r (&tv.tv_sec, &now);
- strftime (now_str, 32, "%Y/%m/%d-%H:%M:%S", &now);
- snprintf (tmp_str, 1024, "%s-%d-%s:%ld",
+ gf_time_fmt (now_str, sizeof now_str, tv.tv_sec, gf_timefmt_Ymd_T);
+ snprintf (tmp_str, sizeof tmp_str, "%s-%d-%s:%ld",
hostname, getpid(), now_str, tv.tv_usec);
return strdup (tmp_str);