From be87c5ac3881886b2274dc270535d34c4eb82bf3 Mon Sep 17 00:00:00 2001 From: Björn Lindström Date: Mon, 24 Oct 2016 13:43:04 +0700 Subject: Setting of custom locale in tztime configuration. (#168) To be able to show my birth country's time zone in that country's locale, and my local time in my current locale. --- i3status.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 239729e..85ada1b 100644 --- a/i3status.c +++ b/i3status.c @@ -385,6 +385,7 @@ int main(int argc, char *argv[]) { cfg_opt_t tztime_opts[] = { CFG_STR("format", "%Y-%m-%d %H:%M:%S %Z", CFGF_NONE), CFG_STR("timezone", "", CFGF_NONE), + CFG_STR("locale", "", CFGF_NONE), CFG_STR("format_time", NULL, CFGF_NONE), CFG_CUSTOM_ALIGN_OPT, CFG_CUSTOM_MIN_WIDTH_OPT, @@ -694,13 +695,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, tv.tv_sec); + print_time(json_gen, buffer, NULL, cfg_getstr(sec, "format"), NULL, NULL, NULL, 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, "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"), tv.tv_sec); SEC_CLOSE_MAP; } -- cgit v1.2.3