Commit Graph

3 Commits

Author SHA1 Message Date
Florian Weimer
35141f304e time: Set daylight to 1 for matching DST/offset change (bug 29951)
The daylight variable is supposed to be set to 1 if DST is ever in
use for the current time zone.  But __tzfile_read used to do this:

  __daylight = rule_stdoff != rule_dstoff;

This check can fail to set __daylight to 1 if the DST and non-DST
offsets happen to be the same.
2023-01-05 18:22:55 +01:00
Hans-Peter Nilsson
ebe899af0d timezone: test-case for BZ #28707
This test-case is the tzfile for Asuncion generated by
tzlib-2021e as follows, using the tzlib-2021e zic: "zic -d
DEST -r @1546300800 -L /dev/null -b slim
SOURCE/southamerica".  Note that in its type 2 header, it
has two entries in its "time-types" array (types), but only
one entry in its "transition types" array (type_idxs).

	* timezone/Makefile, timezone/tst-pr28707.c,
	timezone/testdata/gen-XT5.sh: New test.

Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
2021-12-30 08:11:19 -03:00
Florian Weimer
42261ad731 Make time zone file parser more robust [BZ #17715] 2015-04-24 17:34:48 +02:00