diff options
author | Mark Wells <mark@freeside.biz> | 2015-08-17 22:22:02 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-08-17 22:22:02 -0700 |
commit | feba5016425b52740c29653383343d0d1887a592 (patch) | |
tree | a85f4799e35e7682dc734985d77226131db82a2e /rt/share/html/Elements | |
parent | ef2bc5dcb69e67077ce45a624c107894765e3907 (diff) |
display dates as real dates in Excel export, #23121, update for current RT
Diffstat (limited to 'rt/share/html/Elements')
-rw-r--r-- | rt/share/html/Elements/ShowCustomFieldDate | 6 | ||||
-rw-r--r-- | rt/share/html/Elements/ShowCustomFieldDateTime | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/rt/share/html/Elements/ShowCustomFieldDate b/rt/share/html/Elements/ShowCustomFieldDate index 92ab7679a..1536935c5 100644 --- a/rt/share/html/Elements/ShowCustomFieldDate +++ b/rt/share/html/Elements/ShowCustomFieldDate @@ -49,7 +49,11 @@ my $content = $Object->Content; my $DateObj = RT::Date->new ( $session{'CurrentUser'} ); $DateObj->Set( Format => 'unknown', Value => $content, Timezone => 'utc' ); - $content = $DateObj->AsString(Time => 0, Timezone => 'utc'); + if ($m->notes('FormatDate')) { + $content = $m->notes('FormatDate')->($DateObj); + } else { + $content = $DateObj->AsString(Time => 0, Timezone => 'utc'); + } </%INIT> <%$content|n%> <%ARGS> diff --git a/rt/share/html/Elements/ShowCustomFieldDateTime b/rt/share/html/Elements/ShowCustomFieldDateTime index 2ba873aad..e179d6a4b 100644 --- a/rt/share/html/Elements/ShowCustomFieldDateTime +++ b/rt/share/html/Elements/ShowCustomFieldDateTime @@ -49,7 +49,11 @@ my $content = $Object->Content; my $DateObj = RT::Date->new ( $session{'CurrentUser'} ); $DateObj->Set( Format => 'ISO', Value => $content ); - $content = $DateObj->AsString; + if ($m->notes('FormatDate')) { + $content = $m->notes('FormatDate')->($DateObj); + } else { + $content = $DateObj->AsString; + } </%INIT> <%$content|n%> <%ARGS> |