[tz] Some issues regarding the tz database

Paul Eggert eggert at cs.ucla.edu
Sun Mar 10 22:29:04 UTC 2024


On 2024-03-10 01:42, xzx_work_2020 wrote:

> I used 'cat Asia/Jerusalem' and the result was "IST-2IDT, M3.44/26, M10.5.0".
> However, when I used "echo" IST-2IDT, M3.44/26, M10.5.0 ">/tmp/TZ", this did not work.

I would omit the extra spaces after the ","s. Also, don't you need to 
put it into /etc/TZ? That is, the command should be something like this:

   echo "IST-2IDT,M3.4.4/26,M10.5.0" >/etc/TZ

if you're using OpenWRT with musl.


> Question 1: Is it necessary to handle items that exceed 24 hours during use in this way? 

POSIX.1-2017 does not require support for the "/26". However, it is a 
common extension (it's in glibc for example), and the next POSIX release 
is planned to require support for times from -167:59:50 through +167:59:59.

As I understand it, older versions of musl did not support "/26", but 
newer versions do. (I don't know when this feature was added to musl.) 
Perhaps all you need to do is upgrade musl versions.


> Question 2: I saw from online sources that Asia/Jerusalem entered daylight saving time at 2:00 pm on Friday, March 29, 2024. However, the data in the database seems to be calculated to be 2:00 pm on Friday, the fourth week of March, which is also 2:00 pm on Friday, March 22, 2024. Did I misunderstand this? Or is there an error in the data in the database? 

I think you misunderstood it. The relevant line in the "asia" file is:

   Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D

which says the transition is the first Friday on or after March 23, at 
02:00. This matches current Israeli law, which says the transition 
occurs at 2 am on the Friday before March's last Sunday. This rule 
cannot be encoded in a POSIX.1-2017 TZ setting, which is partly why the 
next POSIX release will allow the "/26".



More information about the tz mailing list