[rt-devel] rt-2.1.62 - some progress

Phil Homewood pdh at snapgear.com
Sun Feb 2 19:21:50 EST 2003


Bart Duchesne wrote:
> I just installed 2.1.65 and had the same problem; after some digging I 
> found that the require of RT::Tickets_Overlay in RT::Tickets fails 
> because Date::Parse is not installed.

Date::Parse should have gone away. Try the following
(as usual) untested attempt at a patch?
-- 
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh at snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances
-------------- next part --------------
diff -ur rt-2-1-66-orig/lib/RT/Date.pm rt-2-1-66/lib/RT/Date.pm
--- rt-2-1-66-orig/lib/RT/Date.pm	2003-02-02 17:47:04.000000000 +1000
+++ rt-2-1-66/lib/RT/Date.pm	2003-02-03 10:19:56.000000000 +1000
@@ -90,10 +90,10 @@
 
 If $args->{'Format'} is ISO, tries to parse an ISO date.
 
-If $args->{'Format'} is 'unknown', require Date::Parse and make it figure things
-out. This is a heavyweight operation that should never be called from within 
-RT's core. But it's really useful for something like the textbox date entry
-where we let the user do whatever they want.
+If $args->{'Format'} is 'unknown', require Time::ParseDate and make it figure
+things out. This is a heavyweight operation that should never be called from
+within RT's core. But it's really useful for something like the textbox date
+entry where we let the user do whatever they want.
 
 If $args->{'Value'}  is 0, assumes you mean never.
 
@@ -174,11 +174,11 @@
         }
     }
     elsif ( $args{'Format'} =~ /^unknown$/i ) {
-        require Date::Parse;
+        require Time::ParseDate;
 
         #Convert it to an ISO format string
 
-        my $date = Date::Parse::str2time( $args{'Value'} );
+        my $date = Time::ParseDate::parsedate( $args{'Value'} );
 
         #This date has now been set to a date in the _local_ timezone.
         #since ISO dates are known to be in GMT (for RT's purposes);
diff -ur rt-2-1-66-orig/lib/RT/Tickets_Overlay.pm rt-2-1-66/lib/RT/Tickets_Overlay.pm
--- rt-2-1-66-orig/lib/RT/Tickets_Overlay.pm	2003-02-02 17:47:06.000000000 +1000
+++ rt-2-1-66/lib/RT/Tickets_Overlay.pm	2003-02-03 10:20:20.000000000 +1000
@@ -350,10 +350,10 @@
   die "Incorrect Meta Data for $field"
     unless (defined $meta->[1]);
 
-  use Date::Parse;
+  require Time::ParseDate;
   use POSIX 'strftime';
 
-  my $time = str2time($value);
+  my $time = Time::ParseDate::parsedate($value);
   $value = strftime("%Y-%m-%d %H:%M",localtime($time));
 
   $sb->_SQLLimit(
@@ -393,7 +393,7 @@
 
 Handle fields limiting based on Transaction Date.
 
-The inpupt value must be in a format parseable by Date::Parse
+The inpupt value must be in a format parseable by Time::ParseDate
 
 Meta Data:
   None


More information about the Rt-devel mailing list