Hello, I have written a timezone library (including a parser) in JavaScript and am running into a bit of confusion with this particular Zone and Rule: # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D Rule Salv 1987 1988 - Sep lastSun 0:00 0 S # There are too many San Salvadors elsewhere, so use America/El_Salvador # instead of America/San_Salvador. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador -6:00 Salv C%sT My question is, what is the applicable Rule for any date after 1988? The last "Salv" Rule ends in 1988, and the Zone states that Salv is the Rule from 1921 on (no UNTIL specified) I've done a "man zic" hoping to see something like "If there is no applicable Rule, just use the basic offset and assume that the LETTER is 'S'", but I could not find anything like that. Is that the correct behavior? Thanks Bobby
This is definitely a FAQ. Is there a page with tz FAQ? Rules define change in the local time. Local time doesn't ends. :) The year 1988 is the last year that there is any change. The last change mentioned - switch to local time + 0:00 in the last Sun of september - defines the time indefinitely. Rodrigo Severo On 9/26/07, Bobby Rullo <br@osafoundation.org> wrote:
Hello,
I have written a timezone library (including a parser) in JavaScript and am running into a bit of confusion with this particular Zone and Rule:
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D Rule Salv 1987 1988 - Sep lastSun 0:00 0 S # There are too many San Salvadors elsewhere, so use America/El_Salvador # instead of America/San_Salvador. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador -6:00 Salv C%sT
My question is, what is the applicable Rule for any date after 1988? The last "Salv" Rule ends in 1988, and the Zone states that Salv is the Rule from 1921 on (no UNTIL specified)
I've done a "man zic" hoping to see something like "If there is no applicable Rule, just use the basic offset and assume that the LETTER is 'S'", but I could not find anything like that. Is that the correct behavior?
Thanks
Bobby
-- --------------------------------------------------------------------------------------- Rodrigo Severo Fábrica de Idéias SBS Quadra 2 - Bloco S - Ed. Empire Center - Sala 1.301 Brasília - DF - CEP 70070-904 Tel. (61) 3321-1357 Fax (61) 3223-1712 ---------------------------------------------------------------------------------------
Thanks Rodrigo, That makes sense now, although I think it would be clearer to change the last Zone line to stop in 1989 and add one more Zone line like so: # Zone NAME GMTOFF RULES FORMAT [UNTIL] -6:00 Salv C%sT 1989 -6:00 - CST The conceptual block that I had to overcome was that I thought of Rules as things that happen every year, and if there's not a rule for that year, it doesn't apply. In other words I didn't grok that "the last rule sticks" A FAQ would be great, or at least an update to the man page for zic - the man page is great as a reference to what each particular field means, but not so great as a high level explanation of the format. take care, Bobby On Sep 26, 2007, at 11:49 AM, Rodrigo Severo wrote:
This is definitely a FAQ. Is there a page with tz FAQ?
Rules define change in the local time. Local time doesn't ends. :)
The year 1988 is the last year that there is any change. The last change mentioned - switch to local time + 0:00 in the last Sun of september - defines the time indefinitely.
Rodrigo Severo
On 9/26/07, Bobby Rullo <br@osafoundation.org> wrote: Hello,
I have written a timezone library (including a parser) in JavaScript and am running into a bit of confusion with this particular Zone and Rule:
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D Rule Salv 1987 1988 - Sep lastSun 0:00 0 S # There are too many San Salvadors elsewhere, so use America/ El_Salvador # instead of America/San_Salvador. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador -6:00 Salv C%sT
My question is, what is the applicable Rule for any date after 1988? The last "Salv" Rule ends in 1988, and the Zone states that Salv is the Rule from 1921 on (no UNTIL specified)
I've done a "man zic" hoping to see something like "If there is no applicable Rule, just use the basic offset and assume that the LETTER is 'S'", but I could not find anything like that. Is that the correct behavior?
Thanks
Bobby
-- ---------------------------------------------------------------------- ----------------- Rodrigo Severo
Fábrica de Idéias SBS Quadra 2 - Bloco S - Ed. Empire Center - Sala 1.301 Brasília - DF - CEP 70070-904 Tel. (61) 3321-1357 Fax (61) 3223-1712 ---------------------------------------------------------------------- -----------------
On 9/26/07, Bobby Rullo <br@osafoundation.org> wrote:
That makes sense now, although I think it would be clearer to change the last Zone line to stop in 1989 and add one more Zone line like so:
# Zone NAME GMTOFF RULES FORMAT [UNTIL] -6:00 Salv C%sT 1989 -6:00 - CST
The conceptual block that I had to overcome was that I thought of Rules as things that happen every year, and if there's not a rule for that year, it doesn't apply. In other words I didn't grok that "the last rule sticks"
I think I haven't made myself clear. It isn't a question of "the last rule sticking". Rules defines changes in presented time.The time defined by the last rule, i.e., the last change in time, sticks, not the last rule. See the diference? Rodrigo Severo
That's what I meant (I think) - I meant that the change in time offset sticks, not that the change happens every year. Did I get that right? Thanks again, Bobby On Sep 26, 2007, at 12:23 PM, Rodrigo Severo wrote:
On 9/26/07, Bobby Rullo <br@osafoundation.org> wrote:
That makes sense now, although I think it would be clearer to change the last Zone line to stop in 1989 and add one more Zone line like so:
# Zone NAME GMTOFF RULES FORMAT [UNTIL] -6:00 Salv C%sT 1989 -6:00 - CST
The conceptual block that I had to overcome was that I thought of Rules as things that happen every year, and if there's not a rule for that year, it doesn't apply. In other words I didn't grok that "the last rule sticks"
I think I haven't made myself clear. It isn't a question of "the last rule sticking". Rules defines changes in presented time. The time defined by the last rule, i.e., the last change in time, sticks, not the last rule. See the diference?
Rodrigo Severo
participants (2)
-
Bobby Rullo -
Rodrigo Severo