[Rt-commit] r19213 - in rt/3.999/trunk: lib/RT
sartak at bestpractical.com
sartak at bestpractical.com
Wed Apr 15 22:50:48 EDT 2009
Author: sartak
Date: Wed Apr 15 22:50:47 2009
New Revision: 19213
Modified:
rt/3.999/trunk/etc/RT_Config.pm
rt/3.999/trunk/lib/RT/DateTime.pm
Log:
Change the DateTime format from strftime specifier to method name
Modified: rt/3.999/trunk/etc/RT_Config.pm
==============================================================================
--- rt/3.999/trunk/etc/RT_Config.pm (original)
+++ rt/3.999/trunk/etc/RT_Config.pm Wed Apr 15 22:50:47 2009
@@ -1296,12 +1296,12 @@
Some examples:
-C<set($DateTimeFormat, '%a, %d %b %Y %H:%M:%S %z');> # RFC2822
-C<set($DateTimeFormat, '%Y-%m-%d %H:%M:%S');> # ISO
+C<set($DateTimeFormat, 'rfc2822');>
+C<set($DateTimeFormat, 'iso');>
=cut
-set($DateTimeFormat, '%Y-%m-%d %H:%M:%S');
+set($DateTimeFormat, 'iso');
# Next two options are for Time::ParseDate
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 Wed Apr 15 22:50:47 2009
@@ -135,7 +135,8 @@
sub config_format {
my $self = _canonicalize_self(@_);
- return $self->strftime(RT->config->get('DateTimeFormat'));
+ my $format = RT->config->get('DateTimeFormat');
+ return $self->$format;
}
sub date {
More information about the Rt-commit
mailing list