summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.c2
-rw-r--r--libglusterfs/src/common-utils.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 1318c4d49a6..b1afa082844 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2470,6 +2470,7 @@ static const char *__gf_timefmts[] = {
"%b %d %T",
"%F %H%M%S",
"%Y-%m-%d-%T",
+ "%s",
};
static const char *__gf_zerotimes[] = {
@@ -2478,6 +2479,7 @@ static const char *__gf_zerotimes[] = {
"xxx 00 00:00:00",
"0000-00-00 000000",
"0000-00-00-00:00:00",
+ "0",
};
void
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index d2bc42b9662..2493ba10816 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -486,13 +486,14 @@ typedef enum {
gf_timefmt_default = 0,
gf_timefmt_FT = 0, /* YYYY-MM-DD hh:mm:ss */
gf_timefmt_Ymd_T, /* YYYY/MM-DD-hh:mm:ss */
- gf_timefmt_bdT, /* ddd DD hh:mm:ss */
+ gf_timefmt_bdT, /* MMM DD hh:mm:ss */
gf_timefmt_F_HMS, /* YYYY-MM-DD hhmmss */
gf_timefmt_dirent,
+ gf_timefmt_s,
gf_timefmt_last
} gf_timefmts;
-static inline void
+static inline char *
gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt)
{
extern void _gf_timestuff (gf_timefmts *, const char ***, const char ***);
@@ -509,6 +510,7 @@ gf_time_fmt (char *dst, size_t sz_dst, time_t utime, unsigned int fmt)
} else {
strncpy (dst, "N/A", sz_dst);
}
+ return dst;
}
int