[tz] posix for asia/tehran is wrong
eggert at cs.ucla.edu
Fri Nov 30 08:58:17 UTC 2018
Guy Harris wrote:
> the correct POSIX TZ setting for Iran, at least as I read the SUS, would be "<+0330>-3:30<+0430>,J81/0,J265/0"
As I mentioned in my previous email, there is no POSIX TZ setting for Iran
because its DST changes don't follow the Gregorian calendar. The string at the
end of the Asia/Tehran file is just an approximation. As near as I can tell, the
string "<+0330>-3:30<+0430>,J80/0,J264/0" at the end of the Asia/Tehran file has
the same behavior as the approximation that the "asia" file uses for far-future
timestamps in Asia/Tehran. So we should be OK here.
> omitting the "J" is not even valid for January and February,
I don't see why not. POSIX says that omitting the J makes it possible to specify
February 29, so clearly omitting the J is valid for pre-March dates.
> zic should probably either:
> ... always put the "J" in
But always putting the "J" in, even when not needed, adds a byte to the output
file for rules in January and February.
> go with 0-based Julian days
That wouldn't be useful for dates after February, as tzdb Rule lines for those
dates never correspond to 0-based Julian days.
More information about the tz