diff options
author | Björn Lindström <bkhl@elektrubadur.se> | 2016-10-24 13:43:04 +0700 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-10-24 08:43:04 +0200 |
commit | be87c5ac3881886b2274dc270535d34c4eb82bf3 (patch) | |
tree | fa75a7bf7fe835dca9c575b94db7512200cfbff6 /i3status.c | |
parent | 707ceffc8b556a3797651d78c0c0f37bae9884ea (diff) |
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.
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |