Skip to content

Commit

Permalink
Remove unused or wrong conversions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nobu committed Oct 20, 2024
1 parent d21b614 commit 75ef89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strftime.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 75ef89c

Please sign in to comment.