apparent-solar-time zone possible cleanup
Zefram
zefram at fysh.org
Sat Oct 1 13:37:52 UTC 2011
The apparent-solar-time zones seem to be misusing the "zzz" indicator,
and they have poor boundary behaviour. The attached patch makes these
changes that seem like a good idea to me:
* abbreviation "LAT", for "Local Apparent Time", during the period where
the zone provides LAT behaviour
* additional apparent-time offset entry for Dec 31 of previous year,
so that the ruleset provides LAT correctly for the first half of Jan 1
* range of validity of the LAT data defined strictly as starting and
ending at Jan 1 00:00 UT
* zone marked as disused outside the range of validity of the LAT data
Also, thoughts on apparent solar time more generally: the existing
solar?? files inconveniently can't be merged because the result would have
more than 256 distinct offsets. However, if the resolution of the offsets
were dropped from 5 s to 10 s, then there would be only 186 distinct
offsets within the range of the equation of time, so we could have an
apparent-time ruleset covering as many years as we're interested in.
That could allow incorporating those rules into the regular Asia/Riyadh
zone, rather than requiring these hacky separate zones. The apparent-time
ruleset could also be formulaically generated at build time, rather than
explicitly included in the source tarball.
-zefram
-------------- next part --------------
diff -ur tz2011j/solar87 tz2011j.mod0/solar87
--- tz2011j/solar87 2011-06-15 11:43:14.000000000 +0100
+++ tz2011j.mod0/solar87 2011-10-01 14:14:44.000000000 +0100
@@ -14,6 +14,7 @@
# stored on disk as unsigned chars.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol87 1986 only - Dec 31 12:02:50s -0:02:50 -
Rule sol87 1987 only - Jan 1 12:03:20s -0:03:20 -
Rule sol87 1987 only - Jan 2 12:03:50s -0:03:50 -
Rule sol87 1987 only - Jan 3 12:04:15s -0:04:15 -
@@ -381,11 +382,11 @@
Rule sol87 1987 only - Dec 31 12:02:45s -0:02:45 -
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
-# Before and after 1987, we'll operate on local mean solar time.
+# LAT = Local Apparent Time
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh87 3:07:04 - zzz 1987
- 3:07:04 sol87 zzz 1988
- 3:07:04 - zzz
+Zone Asia/Riyadh87 0 - zzz 1987 Jan 1 0:00u
+ 3:07:04 sol87 LAT 1988 Jan 1 0:00u
+ 0 - zzz
# For backward compatibility...
Link Asia/Riyadh87 Mideast/Riyadh87
diff -ur tz2011j/solar88 tz2011j.mod0/solar88
--- tz2011j/solar88 2011-06-15 11:43:14.000000000 +0100
+++ tz2011j.mod0/solar88 2011-10-01 14:13:23.000000000 +0100
@@ -13,6 +13,7 @@
# stored on disk as unsigned chars.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol88 1987 only - Dec 31 12:02:45s -0:02:45 -
Rule sol88 1988 only - Jan 1 12:03:15s -0:03:15 -
Rule sol88 1988 only - Jan 2 12:03:40s -0:03:40 -
Rule sol88 1988 only - Jan 3 12:04:10s -0:04:10 -
@@ -381,11 +382,11 @@
Rule sol88 1988 only - Dec 31 12:03:05s -0:03:05 -
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
-# Before and after 1988, we'll operate on local mean solar time.
+# LAT = Local Apparent Time
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh88 3:07:04 - zzz 1988
- 3:07:04 sol88 zzz 1989
- 3:07:04 - zzz
+Zone Asia/Riyadh88 0 - zzz 1988 Jan 1 0:00u
+ 3:07:04 sol88 LAT 1989 Jan 1 0:00u
+ 0 - zzz
# For backward compatibility...
Link Asia/Riyadh88 Mideast/Riyadh88
diff -ur tz2011j/solar89 tz2011j.mod0/solar89
--- tz2011j/solar89 2011-06-15 11:43:14.000000000 +0100
+++ tz2011j.mod0/solar89 2011-10-01 14:13:31.000000000 +0100
@@ -19,6 +19,7 @@
# stored on disk as unsigned chars.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol89 1988 only - Dec 31 12:03:05s -0:03:05 -
Rule sol89 1989 only - Jan 1 12:03:35s -0:03:35 -
Rule sol89 1989 only - Jan 2 12:04:05s -0:04:05 -
Rule sol89 1989 only - Jan 3 12:04:30s -0:04:30 -
@@ -386,11 +387,11 @@
Rule sol89 1989 only - Dec 31 12:03:00s -0:03:00 -
# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
-# Before and after 1989, we'll operate on local mean solar time.
+# LAT = Local Apparent Time
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh89 3:07:04 - zzz 1989
- 3:07:04 sol89 zzz 1990
- 3:07:04 - zzz
+Zone Asia/Riyadh89 0 - zzz 1989 Jan 1 0:00u
+ 3:07:04 sol89 LAT 1990 Jan 1 0:00u
+ 0 - zzz
# For backward compatibility...
Link Asia/Riyadh89 Mideast/Riyadh89
More information about the tz
mailing list