From 75ef89ca16d2c94e845b80e8b97bfc811370a890 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 20 Oct 2024 19:33:21 +0900 Subject: [PATCH] Remove unused or wrong conversions The GMT offset and zone fields are not used in calculating the week number, and `zone` in `struct vtm` is a `VALUE` and should not be cast to `char *` at least. --- strftime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strftime.c b/strftime.c index edaa9f02ce..9be4bb9d07 100644 --- a/strftime.c +++ b/strftime.c @@ -987,10 +987,10 @@ vtm2tm_noyear(const struct vtm *vtm, struct tm *result) tm.tm_yday = vtm->yday-1; tm.tm_isdst = vtm->isdst; #if defined(HAVE_STRUCT_TM_TM_GMTOFF) - tm.tm_gmtoff = NUM2LONG(vtm->utc_offset); + tm.tm_gmtoff = 0; #endif #if defined(HAVE_TM_ZONE) - tm.tm_zone = (char *)vtm->zone; + tm.tm_zone = NULL; #endif *result = tm; }