diff options
author | Ingo Bürk <admin@airblader.de> | 2018-11-17 16:28:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-17 16:28:38 +0100 |
commit | a84ad18fbfe2fa8d9280ca0ad3d131d9fd067afb (patch) | |
tree | b60d4c797e305fabd2213f93b244567e37e2beef /i3status.c | |
parent | 2d38178063d13dd3a1e477dadb31ebad53a2a471 (diff) | |
parent | 1b7501b7ea561404b2dd27297a4ccd7432db46f4 (diff) |
Merge pull request #321 from eplanet/autodisplay-tz
Add timezone switch
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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("hide_if_equals_localtime", 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, "hide_if_equals_localtime"), tv.tv_sec); SEC_CLOSE_MAP; } |