Просмотр исходного кода

* NEWS, Theory: Clear up descriptions of tzdata abbreviations.

(Thanks to Alain Mouette.)
Paul Eggert 10 лет назад
Родитель
Сommit
99b658c3a1
2 измененных файлов с 14 добавлено и 13 удалено
  1. 4 0
      NEWS
  2. 10 13
      Theory

+ 4 - 0
NEWS

@@ -11,6 +11,10 @@ Unreleased, experimental changes
 
     Comments in zone tables have been improved.  (Thanks to J William Piggott.)
 
+    In the Theory file, the description of possible time zone abbreviations in
+    tzdata has been cleaned up, as the old description was unclear and
+    inconsistent.  (Thanks to Alain Mouette for reporting the problem.)
+
 
 Release 2016a - 2016-01-26 23:28:02 -0800
 

+ 10 - 13
Theory

@@ -173,7 +173,7 @@ like 'EST' to be compatible with human tradition and POSIX.
 Here are the general rules used for choosing time zone abbreviations,
 in decreasing order of importance:
 
-	Use abbreviations that consist of three or more ASCII letters.
+	Use three or more characters that are ASCII alphanumerics or '+' or '-'.
 		Previous editions of this database also used characters like
 		' ' and '?', but these characters have a special meaning to
 		the shell and cause commands like
@@ -181,19 +181,16 @@ in decreasing order of importance:
 		to have unexpected effects.
 		Previous editions of this rule required upper-case letters,
 		but the Congressman who introduced Chamorro Standard Time
-		preferred "ChST", so the rule has been relaxed.
-
-		This rule guarantees that all abbreviations could have
-		been specified by a POSIX TZ string.  POSIX
-		requires at least three characters for an
-		abbreviation.  POSIX through 2000 says that an abbreviation
-		cannot start with ':', and cannot contain ',', '-',
-		'+', NUL, or a digit.  POSIX from 2001 on changes this
-		rule to say that an abbreviation can contain only '-', '+',
+		preferred "ChST", so lower-case letters are now allowed.
+		Also, POSIX from 2001 on relaxed the rule to allow '-', '+',
 		and alphanumeric characters from the portable character set
-		in the current locale.  To be portable to both sets of
-		rules, an abbreviation must therefore use only ASCII
-		letters.
+		in the current locale.  In practice ASCII alphanumerics and
+		'+' and '-' are safe in all locales.
+
+		In other words, in the C locale the POSIX extended regular
+		expression [-+[:alnum:]]{3,} should match the abbreviation.
+		This guarantees that all abbreviations could have been
+		specified by a POSIX TZ string.
 
 	Use abbreviations that are in common use among English-speakers,
 		e.g. 'EST' for Eastern Standard Time in North America.