summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 8ed59897c6a..62a3a94ea1d 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -108,7 +108,6 @@ generate_uuid ()
char tmp_str[1024] = {0,};
char hostname[256] = {0,};
struct timeval tv = {0,};
- struct tm now = {0, };
char now_str[32];
if (gettimeofday (&tv, NULL) == -1) {
@@ -123,9 +122,8 @@ generate_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:%"
+ gf_time_fmt (now_str, sizeof now_str, tv.tv_sec, gf_timefmt_Ymd_T);
+ snprintf (tmp_str, sizeof tmp_str, "%s-%d-%s:%"
#ifdef GF_DARWIN_HOST_OS
PRId32,
#else