[Rt-commit] r18857 - rt/3.999/branches/datetime/lib/RT/Model
sartak at bestpractical.com
sartak at bestpractical.com
Thu Mar 19 15:25:26 EDT 2009
Author: sartak
Date: Thu Mar 19 15:25:26 2009
New Revision: 18857
Modified:
rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm
Log:
Use RT::DateTime->now for some ticket stuff instead of
RT::Date->new->set_to_now and stuff
Modified: rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm (original)
+++ rt/3.999/branches/datetime/lib/RT/Model/Ticket.pm Thu Mar 19 15:25:26 2009
@@ -1995,14 +1995,13 @@
return ( 0, _('That ticket has unresolved dependencies') );
}
- my $now = RT::Date->new;
- $now->set_to_now();
+ my $now = RT::DateTime->now;
#If we're changing the status from intial to non-initial, record that we've started
if ( $schema->is_initial( $self->status ) && !$schema->is_initial( $args{status} ) ) {
$self->_set(
column => 'started',
- value => $now->iso,
+ value => $now,
record_transaction => 0
);
}
@@ -2012,7 +2011,7 @@
if ( $schema->is_inactive( $args{status} ) ) {
$self->_set(
column => 'resolved',
- value => $now->iso,
+ value => $now,
record_transaction => 0
);
}
@@ -2074,14 +2073,11 @@
sub _set_told {
my $self = shift;
- my $now = RT::Date->new();
- $now->set_to_now();
-
#use __set to get no ACLs ;)
return (
$self->__set(
column => 'told',
- value => $now->iso
+ value => RT::DateTime->now(),
)
);
}
More information about the Rt-commit
mailing list