[Rt-commit] r16103 - in rt/branches/3.999-DANGEROUS: lib/RT/Action
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Sep 26 12:19:53 EDT 2008
Author: sunnavy
Date: Fri Sep 26 12:19:52 2008
New Revision: 16103
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Action/TicketUpdateDates.pm
Log:
r16878 at sunnavys-mb: sunnavy | 2008-09-27 00:19:05 +0800
the previous date compare before set is wrong in lib/RT/Action/TicketUpdateDates.pm
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Action/TicketUpdateDates.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Action/TicketUpdateDates.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Action/TicketUpdateDates.pm Fri Sep 26 12:19:52 2008
@@ -23,8 +23,20 @@
value => $value,
);
+# the date is not real utc, we set it as utc to get rid of user timezone
+# convert, since record->$obj already get converted, it's wrong to convert
+# it too.
+ my $fake_utc_date = RT::Date->new();
+ $fake_utc_date->set(
+ format => 'unknown',
+ value => $value,
+ timezone => 'UTC',
+ );
+
my $obj = $field . '_obj';
- if ( $date->unix != $self->record->$obj()->unix() ) {
+ if ( $fake_utc_date->unix != $self->record->$obj()->unix() ) {
+ Jifty->log->error( $date->iso, ' ', $self->record->$obj->iso
+ );
my $set = "set_$field";
my ( $status, $msg ) = $self->record->$set( $date->iso );
unless ($status) {
More information about the Rt-commit
mailing list