Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/lib/libc/time
Module Name: src
Committed By: kre
Date: Wed Nov 25 01:43:04 UTC 2026
Modified Files:
src/lib/libc/time: localtime.c
Log Message:
libc/time/localtime.c - fix bad tm_wday calc from TZ=<tzstring>
Simplified version of a patch supplied on the tz list, apparently
from FreeBSD, to correct overflow problems introduced by other
recent changes to the way the values are computed.
When using a TZ setting like TZ=UTC0UTC (where specifying the DST
abbreviation is important), and when time_t is 64 bits, the value
calculated for the tm_wday field of struct tm would underflow, and
be truncated when assigned to that int var, before it was reduced
modulo 7 (days/week) - the 64->32 bit truncation modified the
value incorrectly.
To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/lib/libc/time/localtime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index