From e2e5a8d2befccef2e65a98ae56f94420a9d149a0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 17 Apr 2024 17:58:32 +0200 Subject: [PATCH 1/2] Add the timezone in clock meter I connect to servers with non-local timezones every now and then... Let's add the timezone in clock meter to minimize confusion there. --- ClockMeter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ClockMeter.c b/ClockMeter.c index 9c70b24f6..68a270d37 100644 --- a/ClockMeter.c +++ b/ClockMeter.c @@ -26,7 +26,7 @@ static void ClockMeter_updateValues(Meter* this) { struct tm result; const struct tm* lt = localtime_r(&host->realtime.tv_sec, &result); - strftime(this->txtBuffer, sizeof(this->txtBuffer), "%H:%M:%S", lt); + strftime(this->txtBuffer, sizeof(this->txtBuffer), "%H:%M:%S %Z", lt); } const MeterClass ClockMeter_class = { From 437af50c232e94c078c5ea23e665795373255a48 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 17 Apr 2024 20:52:17 +0200 Subject: [PATCH 2/2] Add the timezone in date/time meter ... just as done in clock meter. --- DateTimeMeter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DateTimeMeter.c b/DateTimeMeter.c index c4ec0def8..f592bce70 100644 --- a/DateTimeMeter.c +++ b/DateTimeMeter.c @@ -26,7 +26,7 @@ static void DateTimeMeter_updateValues(Meter* this) { struct tm result; const struct tm* lt = localtime_r(&host->realtime.tv_sec, &result); - strftime(this->txtBuffer, sizeof(this->txtBuffer), "%F %H:%M:%S", lt); + strftime(this->txtBuffer, sizeof(this->txtBuffer), "%F %H:%M:%S %Z", lt); } const MeterClass DateTimeMeter_class = {