summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2015-03-23 22:12:21 +0100
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2015-03-23 22:12:21 +0100
commitbf223d9b61498a6b1e723bacb007545a696141fe (patch)
tree38d20a2a364328ed7bebd2b5fbc079deba9d624e /src
parent3f9d4c6d897b44be3971af7229bf07e425d0915f (diff)
parent0a84bcb74aeef2efc2f5ccc1cfc674242f311cd2 (diff)
Merge pull request #12 from Airblader/feature-tztime-instance
Pass the "instance" JSON property key for tztime blocks
Diffstat (limited to 'src')
-rw-r--r--src/print_time.c5
1 files changed, 4 insertions, 1 deletions
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);