On 2026-06-29 01:35, Liu Chao via tz wrote:
I was working along the same idea as you, and installed the attached slightly-bigger patch; please give it a try. It works, thanks.
Thanks for checking; glad to hear that things work now.
By the way, what do you need rearguard for? Is this for Java, or something else? One reason is for Java. At the same time, it is also to keep the same as other OS vendors (such as RHEL). If switching from rearguard to vanguard now, it might affect upper-layer third-party softwares and require a significant amount of time to explain the differences between these changes.
Yes, and Java is the primary reason we still have rearguard format. Eventually I'd like to delegate the maintenance of rearguard format to the Java folks (assuming they still need it then) as it is a pain to maintain (as witness our emails in this thread!) and they're the only ones I know who still need it - which is why I asked about Java. As I understand it, although older versions of RHEL used rearguard format, the current version (RHEL 10) uses the main format. So eventually RHEL's need for the old format should go away.
For example, the glibc contains a global variable timezone, which is the opposite value of the gmtoff value in the last line of the timezone with isdst=0. In some time zones, the values of timezone in rearguard and vanguard modes are different.
Yes, just as tm_isdst differs. That's fine, and is expected.
I have seen some softwares directly add or subtract the timezone value to convert the local time to the UTC time.
Any such software is broken, because 'timezone' is the difference between local time and UT during only part of the year, and this is true regardless of whether rearguard format is used. So this issue shouldn't lead to a preference for rearguard format - unless the goal is to reproduce old bugs. Anyway, as you probably know, 'timezone' does not suffice for proper timekeeping, which is why 'timezone' is planned to be removed in a future version of POSIX. See <https://data.iana.org/time-zones/theory.html#functions> and look for "POSIX features no longer needed". So any problem with rearguard and 'timezone' will go away eventually.