[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Thu, 29 May 2008 00:19:31 -0000


raeburn		Wed May 28 20:19:31 2008 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  bug 5710.  Include timezone information.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.173 loncom/interface/lonhtmlcommon.pm:1.174
--- loncom/interface/lonhtmlcommon.pm:1.173	Thu Mar  6 17:30:17 2008
+++ loncom/interface/lonhtmlcommon.pm	Wed May 28 20:19:30 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.173 2008/03/06 22:30:17 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.174 2008/05/29 00:19:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -463,16 +463,21 @@
         $cal_link = qq{<a href="javascript:$dname\_opencalendar()">};
     }
     #
+    my $dt = DateTime->from_epoch(epoch => $currentvalue)
+                     ->set_time_zone(&Apache::lonlocal::gettimezone());
+    my $tzone = ' '.$dt->time_zone_short_name().' ';
     if ($no_hh_mm_ss) {
         $result .= &mt('[_1] [_2] [_3] ',
-                       $monthselector,$dayselector,$yearselector);
+                       $monthselector,$dayselector,$yearselector).
+                   $tzone;
         if (!$nolink) {
             $result .= &mt('[_1]Select Date[_2]',$cal_link,'</a>');
         }
     } else {
         $result .= &mt('[_1] [_2] [_3] [_4] [_5]m [_6]s ',
                       $monthselector,$dayselector,$yearselector,
-                      $hourselector,$minuteselector,$secondselector);
+                      $hourselector,$minuteselector,$secondselector).
+                   $tzone;
         if (!$nolink) {
             $result .= &mt('[_1]Select Date[_2]',$cal_link,'</a>');
         }