From 0a84bcb74aeef2efc2f5ccc1cfc674242f311cd2 Mon Sep 17 00:00:00 2001 From: Ingo Bürk Date: Mon, 23 Mar 2015 21:42:52 +0100 Subject: Pass the "instance" JSON property key for tztime blocks fixes #10 --- src/print_time.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/print_time.c b/src/print_time.c index edbc828..c70a09c 100644 --- a/src/print_time.c +++ b/src/print_time.c @@ -33,10 +33,13 @@ void set_timezone(const char *tz) { } } -void print_time(yajl_gen json_gen, char *buffer, const char *format, const char *tz, time_t t) { +void print_time(yajl_gen json_gen, char *buffer, const char *title, const char *format, const char *tz, time_t t) { char *outwalk = buffer; struct tm tm; + if (title != NULL) + INSTANCE(title); + /* Convert time and format output. */ set_timezone(tz); localtime_r(&t, &tm); -- cgit v1.2.3