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.
This commit is contained in:
parent
d21b614bd4
commit
75ef89ca16
Notes:
git
2024-10-20 11:03:16 +00:00
@ -987,10 +987,10 @@ vtm2tm_noyear(const struct vtm *vtm, struct tm *result)
|
|||||||
tm.tm_yday = vtm->yday-1;
|
tm.tm_yday = vtm->yday-1;
|
||||||
tm.tm_isdst = vtm->isdst;
|
tm.tm_isdst = vtm->isdst;
|
||||||
#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
|
#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
|
||||||
tm.tm_gmtoff = NUM2LONG(vtm->utc_offset);
|
tm.tm_gmtoff = 0;
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_TM_ZONE)
|
#if defined(HAVE_TM_ZONE)
|
||||||
tm.tm_zone = (char *)vtm->zone;
|
tm.tm_zone = NULL;
|
||||||
#endif
|
#endif
|
||||||
*result = tm;
|
*result = tm;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user