On 2024-10-28 09:47, Florian Weimer wrote:
It's not fringe because gmtime and localtime set tm_isdst to a non-negative value. Apparently it's common in applications to feed back those broken times into mktime without resetting tm_isdst.
You're right that tm_isdst not "fringe", as it's required by ISO C and by POSIX. Nonetheless tm_isdst is obsolete except as a hint for mktime, and even there the hint does not work in general in the common case where TZ is a geographical timezone. The particular case that started this thread is whether tm_isdst should be zero or positive for TZ="America/Asuncion" during the period from October 6 through October 15 of this year[1]. This is one of the cases where the behavior of tm_isdst is not specified (or even hinted at) by any standard, and regardless of whether tm_isdst 0 or positive it will not work for common uses of mktime. More generally, tm_isdst's value does not matter for any part of tzdata. When a geographical timezone is used, no application should depend on whether tm_isdst is zero or positive, and no standard tries (or should try) to specify this. [1]: https://lists.iana.org/hyperkitty/list/tz@iana.org/message/BIZ3YBJBVBLCSVIY4...