[Rt-commit] r18858 - in rt/3.999/branches/datetime/lib/RT: Condition

sartak at bestpractical.com sartak at bestpractical.com
Thu Mar 19 15:25:31 EDT 2009


Author: sartak
Date: Thu Mar 19 15:25:31 2009
New Revision: 18858

Modified:
   rt/3.999/branches/datetime/lib/RT/Action/UpdateTicket.pm
   rt/3.999/branches/datetime/lib/RT/Condition/BeforeDue.pm

Log:
More uses of RT::DateTime

Modified: rt/3.999/branches/datetime/lib/RT/Action/UpdateTicket.pm
==============================================================================
--- rt/3.999/branches/datetime/lib/RT/Action/UpdateTicket.pm	(original)
+++ rt/3.999/branches/datetime/lib/RT/Action/UpdateTicket.pm	Thu Mar 19 15:25:31 2009
@@ -31,8 +31,8 @@
         if ( defined $value ) {
 
             # convert date to be as UTC
-            my $date = RT::Date->new_from_string($value);
-            $self->argument_value( $field, $date->iso );
+            my $date = RT::DateTime->new_from_string($value);
+            $self->argument_value($field, $date);
         }
     }
 

Modified: rt/3.999/branches/datetime/lib/RT/Condition/BeforeDue.pm
==============================================================================
--- rt/3.999/branches/datetime/lib/RT/Condition/BeforeDue.pm	(original)
+++ rt/3.999/branches/datetime/lib/RT/Condition/BeforeDue.pm	Thu Mar 19 15:25:31 2009
@@ -48,8 +48,6 @@
 package RT::Condition::BeforeDue;
 use base 'RT::Condition';
 
-use RT::Date;
-
 use strict;
 
 sub is_applicable {
@@ -64,7 +62,7 @@
     }
     my $elapse = $e{'d'} * 24 * 60 * 60 + $e{'h'} * 60 * 60 + $e{'m'} * 60 + $e{'s'};
 
-    my $cur = RT::Date->new( RT->system_user );
+    my $cur = RT::DateTime->now;
     $cur->set_to_now();
     my $due = $self->ticket_obj->due;
     return (undef) if $due->epoch <= 0;


More information about the Rt-commit mailing list