[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-301-g3e726ca

Shawn Moore sartak at bestpractical.com
Wed Dec 1 16:14:06 EST 2010


The branch, 3.9-trunk has been updated
       via  3e726caa4d452455951f92921d1c6e93e3503fa3 (commit)
      from  5da3ac756296a7d6e2a9ed38db238ab733ba7757 (commit)

Summary of changes:
 share/html/Dashboards/Subscription.html |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 3e726caa4d452455951f92921d1c6e93e3503fa3
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Dec 1 16:13:50 2010 -0500

    Localize the subscription timestamp dropdown

diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index 49e5e07..dd11728 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -138,8 +138,14 @@
 <&|/l&>Hour</&>:
 </td><td class="value">
 <select name="Hour">
+% my $formatter = RT::Date->new($session{CurrentUser})->LocaleObj;
+% my $dt = DateTime->now;
+% $dt->set_minute(0);
+% $dt->set_second(0);
+
 % for my $hour (0..23) {
-%     my $formatted = sprintf '%02d:00', $hour;
+%     $dt->set_hour($hour);
+%     my $formatted = $dt->format_cldr($formatter->time_format_short);
 %     my $selected = $formatted eq $fields{'Hour'}
 %                  ? 'selected="selected"'
 %                  : '';

-----------------------------------------------------------------------


More information about the Rt-commit mailing list