[rt-users] Still Can't Figured Out DateTimeFormat
Tim Gustafson
tjg at ucsc.edu
Thu Apr 3 18:12:13 EDT 2014
Hi,
I'm still struggling with setting a custom date/time format in RT 4.2.
I've tried man different variants of the following to no avail:
Set(
$DateTimeFormat,
{
"Format" => "LocalizedDateTime",
"DateFormat" => "MM/dd/yyyy",
"TimeFormat" => "hh:mm a"
}
);
I read the documentation on this option at:
http://www.bestpractical.com/docs/rt/4.2/RT/Date.html#LocalizedDateTime
And based on that documentation, I feel like this ought to work, but
it does not. Specifically, the documentation reads:
----------
LocalizedDateTime
Returns date and time as string, with user localization.
Supports arguments: DateFormat and TimeFormat which may contains date
and time format as specified in DateTime::Locale (default to
date_format_full and time_format_medium), AbbrDayand AbbrMonth which
may be set to 0 if you want full Day/Month names instead of
abbreviated ones.
----------
However, when I set this option in my RT_SiteConfig.pm, the system
defaults back to the default date/time format.
I feel as though this ought to be an easy thing to change, and yet
none of the documentation describes how to do it. I have asked this
question before and never received a satisfactory answer. I recall
that at one point someone was suggesting I create a custom Perl module
and install it into RT for this purpose, but I'm having trouble
accepting that a simple change such as this requires custom coding
(however simple) rather than modifying a configuration option. You
don't need a custom module to set the time zone, so why should you
need one to set the date/time format?
Is there really no simple configuration option that I can set to
format the date and time in an arbitrary way?
--
Tim Gustafson
tjg at ucsc.edu
831-459-5354
Baskin Engineering, Room 313A
More information about the rt-users
mailing list