summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index f860307..267e589 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -293,6 +293,16 @@ tm_format_date(char *x, bird_clock_t t)
}
void
+tm_format_datetime(char *x, bird_clock_t t)
+{
+ struct tm *tm;
+
+ tm = localtime(&t);
+ if (strftime(x, TM_DATETIME_BUFFER_SIZE, "%d-%m-%Y %H:%M:%S", tm) == TM_DATETIME_BUFFER_SIZE)
+ strcpy(x, "<too-long>");
+}
+
+void
tm_format_reltime(char *x, bird_clock_t t)
{
struct tm *tm;