-void print_time(const char *format) {
- static char part[512];
- /* Get date & time */
- time_t current_time = time(NULL);
- if (current_time == (time_t) -1) {
- return;
- }
- struct tm *current_tm = localtime(¤t_time);
- if (current_tm == NULL) {
+#include "i3status.h"
+
+void print_time(yajl_gen json_gen, char *buffer, const char *format, struct tm *current_tm) {
+ char *outwalk = buffer;
+ if (current_tm == NULL)