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