[tz] Java & Rearguard

Paul Eggert eggert at cs.ucla.edu
Fri May 31 20:36:45 UTC 2019


On 5/31/19 10:45 AM, Florian Weimer wrote:
>> TZ='IST-1GMT0,M10.5.0,M3.5.0/1' java [arguments]
>>
> Is this really the right example?  I would have expected something
> negative after the slash.

The "/1" means that the fallback transition occurs at 01:00 local time 
in March, which is a different matter. The topic under discussion is 
whether the "-1" after the "IST" can be numerically less than the "0" 
after the "GMT". POSIX and Internet RFC 8536 both requires support for 
this sort of thing and tzdb and a lot of other software (including the 
GNU C library) implement it, but apparently some software cannot handle it.

The "/1" does raise a separate issue about whether the number after the 
"/" can be negative, which means the transition occurs before 00:00. 
Although POSIX does not require support for a negative time-of-day, 
Internet RFC 8536 does require it, and as far as I know the Java code in 
question also supports it. An example of this is 
TZ='<-03>3<-02>,M3.5.0/-2,M10.5.0/-1', which expresses the rules for 
America/Godthab since 1996. Although this TZ string works in GNU/Linux 
and I assume many other platforms, POSIX does not require support for it.




More information about the tz mailing list