[rt-devel] Fix of wrong displaying of Date Changes
Jan Okrouhly
okrouhly at civ.zcu.cz
Wed Mar 6 10:37:47 EST 2002
Hi,
my colleague realized, that info in Dates box differs from info in the
Ticket History (they weren't displayed in localtime). Here is the fix.
The problem also appeared in the Results box just after Submitting the
change.
--- Transaction.pm.orig Wed Mar 6 16:26:51 2002
+++ Transaction.pm Wed Mar 6 16:31:09 2002
@@ -644,6 +644,15 @@
return ($self->Field . " changed from " . $q1->Name . " to ".
$q2->Name);
}
+ # Write the date/time change at local time:
+ elsif ($self->Field =~ /Due|Starts|Started|Told/) {
+ my $t1 = new RT::Date($self->CurrentUser);
+ $t1->Set(Format => 'ISO', Value => $self->NewValue);
+ my $t2 = new RT::Date($self->CurrentUser);
+ $t2->Set(Format => 'ISO', Value => $self->OldValue);
+ return ($self->Field . " changed from " . $t2->AsString .
+ " to ".$t1->AsString);
+ }
else {
return ($self->Field . " changed from " . $self->OldValue .
" to ".$self->NewValue);
--- cut here ;-) ---
Jan Okrouhly
---------------------------------------\-\-\+\-\-\---okrouhly at civ.zcu.cz---
Laboratory for Computer Science | phone: (420 19) 7491588
University of West Bohemia | location: Univerzitni 22
Americka 42, 306 14 Pilsen, Czech Republic | room: UI404
------------------------------------------73!-de-OK1INC at OK0PPL.#BOH.CZE.EU-
More information about the Rt-devel
mailing list