Bugzilla – Attachment 7600 Details for
Bug 7532
opac-ics depends on Date::ICal which is largely unmaintained
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7532 - remove dependency on Date::ICal
Bug-7532---remove-dependency-on-DateICal.patch (text/plain), 6.94 KB, created by
Jared Camins-Esakov
on 2012-02-13 00:59:52 UTC
(
hide
)
Description:
Bug 7532 - remove dependency on Date::ICal
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-02-13 00:59:52 UTC
Size:
6.94 KB
patch
obsolete
>From 111292b8e5577e072fa4ea406854ab56e0985ea0 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Sun, 12 Feb 2012 16:36:34 +1300 >Subject: [PATCH] Bug 7532 - remove dependency on Date::ICal >Content-Type: text/plain; charset="UTF-8" > >This removes the dependency on Date::ICal (which is largely >unmaintained) and replaces it with DateTime::Format::ICal which can do >the same job. It also updates all the docs and installation scripts to >handle this change. > >Note that this causes a minor behaviour change: previously the generated >times were converted to UTC, now they are left "floating" (that is, have >no timezone attached) and so will appear as the local time when imported >into a calendar. I don't anticipate this'll cause any issues however. > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > C4/Installer/PerlDependencies.pm | 10 +++--- > INSTALL.fedora7 | 3 +- > debian/control | 3 +- > install_misc/debian.packages | 2 +- > install_misc/install_koha_on_fresh_debian | 2 +- > install_misc/ubuntu.packages | 2 +- > install_misc/ubuntu_maverick.packages | 2 +- > opac/opac-ics.pl | 39 +++++++++++++++-------------- > 8 files changed, 32 insertions(+), 31 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 939ed10..0a888a8 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -259,11 +259,6 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '5.43' > }, >- 'Date::ICal' => { >- 'usage' => 'Core', >- 'required' => '1', >- 'min_ver' => '1.72' >- }, > 'MARC::Crosswalk::DublinCore' => { > 'usage' => 'Core', > 'required' => '1', >@@ -484,6 +479,11 @@ our $PERL_DEPS = { > 'required' => '1', > 'min_ver' => '1.03', > }, >+ 'DateTime::Format::ICal' => { >+ 'usage' => 'Core', >+ 'required' => '1', >+ 'min_ver' => '0.09', >+ }, > }; > > 1; >diff --git a/INSTALL.fedora7 b/INSTALL.fedora7 >index 6694eb7..5e5f0d4 100644 >--- a/INSTALL.fedora7 >+++ b/INSTALL.fedora7 >@@ -746,6 +746,8 @@ Net::Z3950::ZOOM > Net::LDAP::Filter > HTML::Template::Pro > Data::ICal >+DateTime >+DateTime::Format::ICal > GD::Barcode::UPCE > Algorithm::CheckDigits::M43_001 > Biblio::EndnoteStyle >@@ -753,7 +755,6 @@ Schedule::At > Barcode::Code128 > CGI::Session > Class::Factory::Util >-Date::ICal > Date::Manip > Lingua::Stem > List::MoreUtils >diff --git a/debian/control b/debian/control >index e0827f9..0a20874 100644 >--- a/debian/control >+++ b/debian/control >@@ -18,8 +18,8 @@ Build-Depends: libcgi-session-driver-memcached-perl, > libclass-factory-util-perl, > libdata-ical-perl, > libdate-calc-perl, >- libdate-ical-perl, > libdate-manip-perl, >+ libdatetime-format-ical-perl, > libdatetime-perl, > libdbd-mysql-perl, > libdbd-sqlite2-perl, >@@ -31,7 +31,6 @@ Build-Depends: libcgi-session-driver-memcached-perl, > libgraphics-magick-perl, > libgravatar-url-perl, > libhtml-scrubber-perl, >- libhtml-template-pro-perl, > libhttp-oai-perl, > libjson-perl, > liblingua-stem-perl, >diff --git a/install_misc/debian.packages b/install_misc/debian.packages >index 8c33960..6be4daa 100644 >--- a/install_misc/debian.packages >+++ b/install_misc/debian.packages >@@ -17,8 +17,8 @@ libcgi-session-serialize-yaml-perl install > libclass-factory-util-perl install > libdata-ical-perl install > libdate-calc-perl install >-libdate-ical-perl install > libdate-manip-perl install >+libdatetime-format-ical-perl install > libdatetime-format-mail-perl install > libdatetime-format-strptime-perl install > libdatetime-format-w3cdtf-perl install >diff --git a/install_misc/install_koha_on_fresh_debian b/install_misc/install_koha_on_fresh_debian >index 6ff1e14..d4b313b 100644 >--- a/install_misc/install_koha_on_fresh_debian >+++ b/install_misc/install_koha_on_fresh_debian >@@ -440,8 +440,8 @@ mysql-server > libcgi-session-perl > libdate-calc-perl > libdate-manip-perl >-libdate-ical-perl > libdatetime-format-mail-perl >+libdatetime-format-ical-perl > liblingua-stem-perl > libdatetime-format-strptime-perl > libdatetime-format-w3cdtf-perl >diff --git a/install_misc/ubuntu.packages b/install_misc/ubuntu.packages >index 93a0844..f211769 100644 >--- a/install_misc/ubuntu.packages >+++ b/install_misc/ubuntu.packages >@@ -56,9 +56,9 @@ libcgi-session-serialize-yaml-perl install > libclass-factory-util-perl install > libdata-ical-perl install > libdate-calc-perl install >-libdate-ical-perl install > libdate-manip-perl install > libdatetime-perl install >+libdatetime-format-ical-perl install > libdatetime-format-mail-perl install > libdatetime-format-strptime-perl install > libdatetime-format-w3cdtf-perl install >diff --git a/install_misc/ubuntu_maverick.packages b/install_misc/ubuntu_maverick.packages >index fe04038..9b806bb 100644 >--- a/install_misc/ubuntu_maverick.packages >+++ b/install_misc/ubuntu_maverick.packages >@@ -58,9 +58,9 @@ libcgi-session-serialize-yaml-perl install > libclass-factory-util-perl install > libdata-ical-perl install > libdate-calc-perl install >-libdate-ical-perl install > libdate-manip-perl install > libdatetime-perl install >+libdatetime-format-ical-perl install > libdatetime-format-mail-perl install > libdatetime-format-strptime-perl install > libdatetime-format-w3cdtf-perl install >diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl >index 5a8512a..337a939 100755 >--- a/opac/opac-ics.pl >+++ b/opac/opac-ics.pl >@@ -25,7 +25,8 @@ use warnings; > use CGI; > use Data::ICal; > use Data::ICal::Entry::Event; >-use Date::ICal; >+use DateTime; >+use DateTime::Format::ICal; > use Date::Calc qw (Parse_Date); > > use C4::Auth; >@@ -60,28 +61,28 @@ foreach my $issue ( @$issues ) { > my ($year,$month,$day)=Parse_Date($issue->{'date_due'}); > ($year,$month,$day)=split /-|\/|\.|:/,$issue->{'date_due'} unless ($year && $month); > # Decode_Date_EU2($string)) >- my $datestart = Date::ICal->new( >- day => $day, >- month => $month, >- year => $year, >- hour => 9, >- min => 0, >- sec => 0 >- )->ical; >- my $dateend = Date::ICal->new( >- day => $day, >- month => $month, >- year => $year, >- hour => 10, >- min => 0, >- sec => 0 >- )->ical; >+ my $datestart = DateTime->new( >+ day => $day, >+ month => $month, >+ year => $year, >+ hour => 9, >+ minute => 0, >+ second => 0 >+ ); >+ my $dateend = DateTime->new( >+ day => $day, >+ month => $month, >+ year => $year, >+ hour => 10, >+ minute => 0, >+ second => 0 >+ ); > $vevent->add_properties( > summary => "$issue->{'title'} Due", > description => > "Your copy of $issue->{'title'} barcode $issue->{'barcode'} is due back at the library today", >- dtstart => $datestart, >- dtend => $dateend, >+ dtstart => DateTime::Format::ICal->format_datetime($datestart), >+ dtend => DateTime::Format::ICal->format_datetime($dateend), > ); > $calendar->add_entry($vevent); > } >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7532
:
7578
| 7600