From b208d5841e88d1050a97c4571243932578f3504f Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 8 Dec 2024 12:52:41 -0800
Subject: [PROPOSED] Etc/Unknown is now reserved

(Thanks to Justin Grant, Mark Davis, and Guy Harris.)
* NEWS, etcetera, factory, theory.html: Mention this.
---
 NEWS        |  6 ++++++
 etcetera    |  4 ++++
 factory     | 10 ++++++++++
 theory.html |  7 +++++--
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index a484ded2..79686147 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Unreleased, experimental changes
   Briefly:
     Paraguay adopts permanent -03 starting spring 2024.
     Improve pre-1991 data for the Philippines.
+    Etc/Unknown is now reserved.
 
   Changes to future timestamps
 
@@ -57,6 +58,11 @@ Unreleased, experimental changes
 
   Changes to documentation
 
+    The name Etc/Unknown is now reserved: it will not be used by TZDB.
+    This is for compatibility with CLDR, which uses the string
+    "Etc/Unknown" for an unknown or invalid timezone.  (Thanks to
+    Justin Grant, Mark Davis, and Guy Harris.)
+
     Cite Internet RFC 9636, which obsoletes RFC 8536 for TZif format.
 
 
diff --git a/etcetera b/etcetera
index a5ecd6de..948531c8 100644
--- a/etcetera
+++ b/etcetera
@@ -51,6 +51,10 @@ Link	Etc/GMT				GMT
 # so we moved the names into the Etc subdirectory.
 # Also, the time zone abbreviations are now compatible with %z.
 
+# There is no "Etc/Unknown" entry, as CLDR says that "Etc/Unknown"
+# corresponds to an unknown or invalid time zone, and things would get
+# confusing if Etc/Unknown were made valid here.
+
 Zone	Etc/GMT-14	14	-	%z
 Zone	Etc/GMT-13	13	-	%z
 Zone	Etc/GMT-12	12	-	%z
diff --git a/factory b/factory
index 9f5fc330..433a6721 100644
--- a/factory
+++ b/factory
@@ -8,5 +8,15 @@
 # time zone abbreviation "-00", indicating that the actual time zone
 # is unknown.
 
+# TZ="Factory" was added to TZDB in 1989, and in 2016 its abbreviation
+# was changed to "-00" from a longish English-language error message.
+# Around 2010, CLDR added "Etc/Unknown" for use with TZDB, to stand
+# for an unknown or invalid time zone.  These two notions differ:
+# TZ="Factory" is a valid timezone, so tzalloc("Factory") succeeds, whereas
+# TZ="Etc/Unknown" is invalid and tzalloc("Etc/Unknown") fails.
+# Also, a downstream distributor could modify Factory to be a
+# default timezone suitable for the devices it manufactures,
+# whereas that cannot happen for Etc/Unknown.
+
 # Zone	NAME	STDOFF	RULES	FORMAT
 Zone	Factory	0	-	-00
diff --git a/theory.html b/theory.html
index f4b3dfa3..50164024 100644
--- a/theory.html
+++ b/theory.html
@@ -123,8 +123,9 @@ If geolocation information is available, a selection interface can
 locate the user on a timezone map or prioritize names that are
 geographically close. For an example selection interface, see the
 <code>tzselect</code> program in the <code><abbr>tz</abbr></code> code.
-The <a href="https://cldr.unicode.org">Unicode Common Locale Data
-Repository</a> contains data that may be useful for other selection
+Unicode's <a href="https://cldr.unicode.org">Common Locale Data
+Repository (<abbr>CLDR</abbr>)</a>
+contains data that may be useful for other selection
 interfaces; it maps timezone names like <code>Europe/Prague</code> to
 locale-dependent strings like "Prague", "Praha", "Прага", and "布拉格".
 </p>
@@ -200,6 +201,8 @@ in decreasing order of importance:
   <li>
     A name must not be empty, or contain '<code>//</code>', or
     start or end with '<code>/</code>'.
+    Also, a name must not be '<code>Etc/Unknown</code>', as
+    <abbr>CLDR</abbr> uses that string for an unknown or invalid timezone.
   </li>
   <li>
     Do not use names that differ only in case.
-- 
2.47.0

