From ac6c2a7d46603202be3a4f4d677f0be274d15e23 Mon Sep 17 00:00:00 2001 From: eplanet Date: Sat, 10 Nov 2018 10:47:05 +0100 Subject: Add timezone switch --- i3status.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index da4bc78..ea29a35 100644 --- a/i3status.c +++ b/i3status.c @@ -399,6 +399,7 @@ int main(int argc, char *argv[]) { CFG_STR("timezone", "", CFGF_NONE), CFG_STR("locale", "", CFGF_NONE), CFG_STR("format_time", NULL, CFGF_NONE), + CFG_BOOL("only_when_tz_different", false, CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, CFG_CUSTOM_SEPARATOR_OPT, @@ -749,13 +750,13 @@ int main(int argc, char *argv[]) { CASE_SEC("time") { SEC_OPEN_MAP("time"); - print_time(json_gen, buffer, NULL, cfg_getstr(sec, "format"), NULL, NULL, NULL, tv.tv_sec); + print_time(json_gen, buffer, NULL, cfg_getstr(sec, "format"), NULL, NULL, NULL, false, tv.tv_sec); SEC_CLOSE_MAP; } CASE_SEC_TITLE("tztime") { SEC_OPEN_MAP("tztime"); - print_time(json_gen, buffer, title, cfg_getstr(sec, "format"), cfg_getstr(sec, "timezone"), cfg_getstr(sec, "locale"), cfg_getstr(sec, "format_time"), tv.tv_sec); + print_time(json_gen, buffer, title, cfg_getstr(sec, "format"), cfg_getstr(sec, "timezone"), cfg_getstr(sec, "locale"), cfg_getstr(sec, "format_time"), cfg_getbool(sec, "only_when_tz_different"), tv.tv_sec); SEC_CLOSE_MAP; } -- cgit v1.2.3