From c5f6ef85188c210a4669ce5c8778983dcb4369f3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 4 Oct 2020 13:43:00 -0700 Subject: [PATCH 43/47] Convert tz-how-to.html to HTML 5 This simplifies maintenance and should not affect appearance. * tz-how-to.html: Convert to HTML 5, preserving the old appearance as much as possible on Firefox 81. * Makefile (SGML_TOPDIR, SGML_DTDDIR, SGML_SEARCH_PATH) (SGML_CATALOG_FILES, VALIDATE, VALIDATE_FLAGS, VALIDATE_ENV): Remove; no longer needed. (check_tz-how-to.html): Check this just like the other HTML files. --- Makefile | 26 +----------- tz-how-to.html | 130 ++++++++++++++++++++++++++++++++------------------------- 2 files changed, 74 insertions(+), 82 deletions(-) diff --git a/Makefile b/Makefile index 75b906d..28972c6 100644 --- a/Makefile +++ b/Makefile @@ -412,26 +412,6 @@ CURL= curl # Name of GNU Privacy Guard , used to sign distributions. GPG= gpg -# The path where SGML DTDs are kept and the catalog file(s) to use when -# validating HTML 4.01. The default should work on both Debian and Red Hat. -SGML_TOPDIR= /usr -SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd -SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224 -SGML_CATALOG_FILES= \ - $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat - -# The name, arguments and environment of a program to validate HTML 4.01. -# See for a validator, and -# for a validation library. -# Set VALIDATE=':' if you do not have such a program. -VALIDATE = nsgmls -VALIDATE_FLAGS = -s -B -wall -wno-unused-param -VALIDATE_ENV = \ - SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \ - SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \ - SP_CHARSET_FIXED=YES \ - SP_ENCODING=UTF-8 - # This expensive test requires USE_LTZ. # To suppress it, define this macro to be empty. CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives @@ -826,15 +806,13 @@ check_tzs: $(TZS) $(TZS_NEW) check_web: $(CHECK_WEB_PAGES) check_theory.html: theory.html check_tz-art.html: tz-art.html +check_tz-how-to.html: tz-how-to.html check_tz-link.html: tz-link.html -check_theory.html check_tz-art.html check_tz-link.html: +check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html: $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \ -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \ test ! -s $@.out || { cat $@.out; exit 1; } mv $@.out $@ -check_tz-how-to.html: tz-how-to.html - $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html - touch $@ # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. diff --git a/tz-how-to.html b/tz-how-to.html index 3cb446f..bf3e86f 100644 --- a/tz-how-to.html +++ b/tz-how-to.html @@ -1,12 +1,16 @@ - - + + How to Read the tz Database - - @@ -31,13 +35,15 @@ about the zones.

for Chicago (from the northamerica file in the data subdirectory):

- +
-
From the Source File
-
+  
+ + - + - + - + - + - + - + @@ -150,13 +156,15 @@ time changed in 1955. Got it?

OK, now for the somewhat more interesting “US” rules:

-
+
 #Rule NAME    FROM TO    -   IN  ON      AT   SAVE LETTER
 Rule  Chicago 1920 only  -   Jun 13      2:00 1:00 D
 Rule  Chicago 1920 1921  -   Oct lastSun 2:00 0    S
@@ -58,35 +64,35 @@ Rule  Chicago 1955 1966  -   Oct lastSun 2:00 0    S
   
At Action
1920 only June 13th 02:00 local go to daylight saving time
1920 1921 last Sunday in October return to standard time
1921 only in March go to daylight saving time
1922 1966 in April
1954 in September return to standard time
1955 1966 in October
+
-
From the Source File
-
+  
+ + - + @@ -192,16 +200,16 @@ Rule US 2007 max - Nov Sun>=1 2:00 0 S - + - + - + @@ -210,47 +218,47 @@ Rule US 2007 max - Nov Sun>=1 2:00 0 S clocks don’t change - + - + - + - + - + - + - + - + - + @@ -316,13 +324,15 @@ rule, so there should be no change.

OK, now let’s look at a Zone record:

-
+
 #Rule NAME FROM TO    -   IN  ON        AT   SAVE LETTER/S
 Rule  US   1918 1919  -   Mar lastSun  2:00  1:00 D
 Rule  US   1918 1919  -   Oct lastSun  2:00  0    S
@@ -184,7 +192,7 @@ Rule  US   2007 max   -   Nov Sun>=1   2:00  0    S
   
At Action
1918 1919 last Sunday02:00 local go to daylight saving time
in October return to standard time
1942 only February 9th go to “war time”
1945 only August 14th 23:00 UT
September 30th 02:00 local return to standard time
1967 2006 last Sunday in October
1973 in April go to daylight saving time
1974 only January 6th
1975 only February 23rd
1976 1986 last Sunday in April
1987 2006 first Sunday
2007 present second Sunday in March
first Sunday in November return to standard time
+
-
From the Source File
-
+  
+ + - + - + - + - + - + - + - + - + @@ -557,13 +567,15 @@ the true offset is undefined.

As a final example, here’s the complete history for Hawaii:

-
+
 #Zone       NAME      STDOFF   RULES FORMAT [UNTIL]
 Zone  America/Chicago -5:50:36 -       LMT  1883 Nov 18 12:09:24
                       -6:00    US      C%sT 1920
@@ -350,49 +360,49 @@ Zone  America/Chicago -5:50:36 -       LMT  1883 Nov 18 12:09:24
   
Date Time
−5:50:36 not observed LMT 1883-11-18 12:09:24
−6:00:00 US rules CST or CDT 1920-01-01 00:00:00
Chicago rules 1936-03-01 02:00:00
−5:00:00 not observed EST 1936-11-15
−6:00:00 Chicago rules CST or CDT 1942-01-01 00:00:00
US rules CST, CWT or CPT 1946-01-01
Chicago rules CST or CDT 1967-01-01
US rules
+
-
Relevant Excerpts from the US Rules
-
+  
+ + -
+
 #Rule NAME FROM TO   -    IN  ON      AT     SAVE LETTER/S
 Rule  US   1918 1919 -    Oct lastSun  2:00  0    S
 Rule  US   1942 only -    Feb  9       2:00  1:00 W # War
@@ -576,8 +588,10 @@ Rule  US   1945 only -    Sep lastSun  2:00  0    S
   
The Zone Record
-
+  
+ + - + @@ -610,7 +624,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 - + @@ -618,7 +632,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 - + @@ -626,7 +640,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 - + @@ -634,7 +648,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 - + @@ -642,38 +656,38 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 - + - + - + - - -
+
 #Zone NAME            STDOFF    RULES FORMAT [UNTIL]
 Zone Pacific/Honolulu -10:31:26 -     LMT    1896 Jan 13 12:00
                       -10:30    -     HST    1933 Apr 30  2:00
@@ -602,7 +616,7 @@ Zone Pacific/Honolulu -10:31:26 -     LMT    1896 Jan 13 12:00
   
Date Time
−10:31:26 LMT1896-01-13 12:00
−10:30 +0:01:26 HST1933-04-30 02:00
−9:30 +1:00 HDT1933-05-21 12:00
−10:30¹ −1:00¹ HST¹1942-02-09 02:00
−9:30 +1:00 HWT1945-08-14 13:30²
0 HPT Hawaii peace time 1945-09-30 02:00
−10:30 −1:00 HST Hawaii standard time 1947-06-08
−10:00³ +0:30³
+ ¹Switching to US rules…most recent transition (in 1919) was to standard time
+ ²23:00 UT + (−9:30) = 13:30 local
+ ³Since 1947–06–08T12:30Z, the civil time in Hawaii has been UT/UTC -- 1.8.3.1