You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.7 KiB

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