From 6858da9747f40e48254e7e71c9c84ec6ab5b2699 Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Sun, 21 Jun 2020 02:31:08 -0400 Subject: [PATCH] Print actual timezone in effect after the date/time --- apps/date65.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/date65.c b/apps/date65.c index 97f676a..e8f43ba 100644 --- a/apps/date65.c +++ b/apps/date65.c @@ -255,6 +255,7 @@ void readtimezonefile(void) { } fscanf(fp, "%s,%u", nondst_tz_code, &nondst_tz_secs); fscanf(fp, "%s,%u", dst_tz_code, &dst_tz_secs); + nondst_tz_code[3] = dst_tz_code[3] = 0; fclose(fp); } @@ -414,7 +415,7 @@ int main(void) printf("%s", datestr); if (dst) { ++dt.hour; // Spring forward! - printf(" (DST)"); + printf(" (%s)", dst ? dst_tz_code : nondst_tz_code); } p = (unsigned char*)0xbf98;