Dafang-Hacks / Main

138 stars 63 forks source link

uclibc doesn't support /etc/TZ correctly for Israel standard time #30

Open tsvi opened 5 years ago

tsvi commented 5 years ago

uclibc is responsible for parsing the timezone file. According to GNU's libc documentation:

Israel Standard Time (IST) and Israel Daylight Time (IDT) are 2 hours ahead of the prime meridian in winter, springing forward an hour on March’s fourth Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March 23), and falling back on October’s last Sunday at 02:00. IST-2IDT,M3.4.4/26,M10.5.0

Unfortunately, when entering the above string into /etc/TZ, the value is not recognized and reverted to UTC. The moment the value of 26 is changed to a value lower than 24, the string is accepted.

This seems to be a bug in uclibc's parsing of the above string.

I sent a mail to uclibc's mailing list. It seems to me that this is also the issue with the following comment on OpenWRT's bugtracker