From ca9bee8b885e810fd849abcb9b544b487636854c Mon Sep 17 00:00:00 2001 From: Emeric Planet Date: Sat, 19 Aug 2017 14:56:30 +0200 Subject: [PATCH] Use local timezone for battery %emptytime (#236) --- src/print_battery_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/print_battery_info.c b/src/print_battery_info.c index f15cbfa..e9077ec 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -602,6 +602,7 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char } else if (BEGINS_WITH(walk + 1, "emptytime")) { if (batt_info.seconds_remaining >= 0) { time_t empty_time = time(NULL) + batt_info.seconds_remaining; + set_timezone(NULL); /* Use local time. */ struct tm *empty_tm = localtime(&empty_time); if (hide_seconds) -- 2.39.5