Skip to content

Commit 75ef89c

Browse files
committed
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.
1 parent d21b614 commit 75ef89c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strftime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,10 +987,10 @@ vtm2tm_noyear(const struct vtm *vtm, struct tm *result)
987987
tm.tm_yday = vtm->yday-1;
988988
tm.tm_isdst = vtm->isdst;
989989
#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
990-
tm.tm_gmtoff = NUM2LONG(vtm->utc_offset);
990+
tm.tm_gmtoff = 0;
991991
#endif
992992
#if defined(HAVE_TM_ZONE)
993-
tm.tm_zone = (char *)vtm->zone;
993+
tm.tm_zone = NULL;
994994
#endif
995995
*result = tm;
996996
}

0 commit comments

Comments
 (0)