Blame SOURCES/DateTime-TimeZone-1.70-Recognize-short-zone-names-starting-with-a-sign.patch

b66aba
From cbca7770b9ead257b43f073b09abea3bd400ac0e Mon Sep 17 00:00:00 2001
b66aba
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
b66aba
Date: Tue, 11 Jul 2017 14:09:46 +0200
b66aba
Subject: [PATCH] Recognize short zone names starting with a sign
b66aba
b66aba
Since tzdata 2017a, Africa/Accra uses GMT/+0020 short names and the conversion
b66aba
script from DateTime-TimeZones-1.96 adds support for this syntax.
b66aba
---
b66aba
 lib/DateTime/TimeZone/OlsonDB/Change.pm | 2 +-
b66aba
 tools/tests_from_zdump                  | 2 +-
b66aba
 2 files changed, 2 insertions(+), 2 deletions(-)
b66aba
b66aba
diff --git a/lib/DateTime/TimeZone/OlsonDB/Change.pm b/lib/DateTime/TimeZone/OlsonDB/Change.pm
b66aba
index 5bebbfa..b312f97 100644
b66aba
--- a/lib/DateTime/TimeZone/OlsonDB/Change.pm
b66aba
+++ b/lib/DateTime/TimeZone/OlsonDB/Change.pm
b66aba
@@ -43,7 +43,7 @@ sub new {
b66aba
     $p{is_dst} = 1 if $p{rule} && $p{rule}->offset_from_std;
b66aba
     $p{is_dst} = 1 if $p{observance}->offset_from_std;
b66aba
 
b66aba
-    if ( $p{short_name} =~ m{(\w+)/(\w+)} ) {
b66aba
+    if ( $p{short_name} =~ m{([\-\+\w]+)/([\-\+\w]+)} ) {
b66aba
         $p{short_name} = $p{is_dst} ? $2 : $1;
b66aba
     }
b66aba
 
b66aba
diff --git a/tools/tests_from_zdump b/tools/tests_from_zdump
b66aba
index b013b7c..03465ee 100755
b66aba
--- a/tools/tests_from_zdump
b66aba
+++ b/tools/tests_from_zdump
b66aba
@@ -147,7 +147,7 @@ sub make_test_file {
b66aba
                             \s+
b66aba
                             (\d\d\d\d)    # local year
b66aba
                             \s+
b66aba
-                            (\w+)         # local short name
b66aba
+                            ([\-\+\w]+)   # local short name
b66aba
                             \s+
b66aba
                             isdst=(1|0)
b66aba
                             \s+
b66aba
-- 
b66aba
1.8.3.1
b66aba