[Rt-commit] r18583 - in rt/3.999/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Tue Feb 24 22:23:03 EST 2009
Author: sartak
Date: Tue Feb 24 22:23:03 2009
New Revision: 18583
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/lib/RT/DateTime.pm
Log:
r80559 at onn: sartak | 2009-02-24 22:22:56 -0500
Stringify RT::DateTime objects to "unset" if their epoch is 0
Modified: rt/3.999/trunk/lib/RT/DateTime.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/DateTime.pm (original)
+++ rt/3.999/trunk/lib/RT/DateTime.pm Tue Feb 24 22:23:03 2009
@@ -8,6 +8,13 @@
use constant duration_class => 'RT::DateTime::Duration';
+sub _stringify {
+ my $self = shift;
+
+ return "unset" if $self->epoch == 0;
+ return $self->SUPER::_stringify(@_);
+}
+
sub age {
my $self = shift;
my $until = shift || RT::DateTime->now;
More information about the Rt-commit
mailing list