summaryrefslogtreecommitdiff
path: root/strftime.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-10-20 19:33:21 +0900
committerNobuyoshi Nakada <[email protected]>2024-10-20 19:33:21 +0900
commit75ef89ca16d2c94e845b80e8b97bfc811370a890 (patch)
treec6f7f628c3d285de448646789dcf242f22b4375f /strftime.c
parentd21b614bd4af3a1ce5b0c3a4e76f695cfec6a816 (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11922
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c4
1 files 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;
}