|
|
029baf |
From 27a96035f1da2ff0f4801fedffdb7a8cdadd3fc7 Mon Sep 17 00:00:00 2001
|
|
|
029baf |
From: Dave Rolsky <autarch@urth.org>
|
|
|
029baf |
Date: Mon, 5 Jan 2015 08:53:52 -0600
|
|
|
029baf |
Subject: [PATCH 1/2] There will be a leap second on June 30, 2015
|
|
|
029baf |
MIME-Version: 1.0
|
|
|
029baf |
Content-Type: text/plain; charset=UTF-8
|
|
|
029baf |
Content-Transfer-Encoding: 8bit
|
|
|
029baf |
|
|
|
029baf |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
029baf |
---
|
|
|
029baf |
leaptab.txt | 1 +
|
|
|
029baf |
lib/DateTime/LeapSecond.pm | 4 +---
|
|
|
029baf |
t/19leap-second.t | 1 +
|
|
|
029baf |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
029baf |
|
|
|
029baf |
diff --git a/leaptab.txt b/leaptab.txt
|
|
|
029baf |
index f1c7f2e..4075fbd 100644
|
|
|
029baf |
--- a/leaptab.txt
|
|
|
029baf |
+++ b/leaptab.txt
|
|
|
029baf |
@@ -23,3 +23,4 @@
|
|
|
029baf |
2006 Jan. 1 +1
|
|
|
029baf |
2009 Jan. 1 +1
|
|
|
029baf |
2012 Jul. 1 +1
|
|
|
029baf |
+2015 Jul. 1 +1
|
|
|
029baf |
diff --git a/lib/DateTime/LeapSecond.pm b/lib/DateTime/LeapSecond.pm
|
|
|
029baf |
index c5bf97c..736f2eb 100644
|
|
|
029baf |
--- a/lib/DateTime/LeapSecond.pm
|
|
|
029baf |
+++ b/lib/DateTime/LeapSecond.pm
|
|
|
029baf |
@@ -74,9 +74,6 @@ sub day_length {
|
|
|
029baf |
|
|
|
029baf |
sub _initialize {
|
|
|
029baf |
|
|
|
029baf |
- # this table: ftp://62.161.69.5/pub/tai/publication/leaptab.txt
|
|
|
029baf |
- # known accurate until (at least): 2005-12-31
|
|
|
029baf |
- #
|
|
|
029baf |
# There are no leap seconds before 1972, because that's the
|
|
|
029baf |
# year this system was implemented.
|
|
|
029baf |
#
|
|
|
029baf |
@@ -109,6 +106,7 @@ sub _initialize {
|
|
|
029baf |
2006 Jan. 1 +1
|
|
|
029baf |
2009 Jan. 1 +1
|
|
|
029baf |
2012 Jun. 1 +1
|
|
|
029baf |
+ 2015 Jul. 1 +1
|
|
|
029baf |
)
|
|
|
029baf |
);
|
|
|
029baf |
}
|
|
|
029baf |
diff --git a/t/19leap-second.t b/t/19leap-second.t
|
|
|
029baf |
index ecd2598..3d9434c 100644
|
|
|
029baf |
--- a/t/19leap-second.t
|
|
|
029baf |
+++ b/t/19leap-second.t
|
|
|
029baf |
@@ -1156,6 +1156,7 @@ use DateTime;
|
|
|
029baf |
[ 2005, 12, 31 ],
|
|
|
029baf |
[ 2008, 12, 31 ],
|
|
|
029baf |
[ 2012, 6, 30 ],
|
|
|
029baf |
+ [ 2015, 6, 30 ],
|
|
|
029baf |
) {
|
|
|
029baf |
my $formatted = join '-', map { sprintf( '%02d', $_ ) } @{$date};
|
|
|
029baf |
|
|
|
029baf |
--
|
|
|
029baf |
2.5.5
|
|
|
029baf |
|