summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index f725c7c902..d3add33e16 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -617,6 +617,10 @@ int parse_rfc1123_time(const char *buf, time_t *t) {
return 0;
}
+void format_local_iso_time(char *buf, time_t t) {
+ strftime(buf, ISO_TIME_LEN+1, "%Y-%m-%d %H:%M:%S", localtime(&t));
+}
+
void format_iso_time(char *buf, time_t t) {
strftime(buf, ISO_TIME_LEN+1, "%Y-%m-%d %H:%M:%S", gmtime(&t));
}