Merge branch 'master' of https://github.com/jgoodman/Freeside
[freeside.git] / rt / lib / RT / Condition / BeforeDue.pm
index d119ff0..73015bc 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -52,6 +52,7 @@ use base 'RT::Condition';
 use RT::Date;
 
 use strict;
+use warnings;
 
 sub IsApplicable {
     my $self = shift;
@@ -65,7 +66,7 @@ sub IsApplicable {
     }
     my $elapse = $e{'d'} * 24*60*60 + $e{'h'} * 60*60 + $e{'m'} * 60 + $e{'s'};
 
-    my $cur = new RT::Date( $RT::SystemUser );
+    my $cur = RT::Date->new( RT->SystemUser );
     $cur->SetToNow();
     my $due = $self->TicketObj->DueObj;
     return (undef) if $due->Unix <= 0;