--- loncom/interface/lonhtmlcommon.pm 2007/11/06 04:39:19 1.169 +++ loncom/interface/lonhtmlcommon.pm 2008/05/29 00:19:30 1.174 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.169 2007/11/06 04:39:19 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 @@ ENDJS $cal_link = qq{}; } # + 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,''); } } 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,''); } @@ -645,6 +650,8 @@ sub javascript_nothing { ############################################## ############################################## sub javascript_docopen { + my ($mimetype) = @_; + $mimetype ||= 'text/html'; # safari does not understand document.open() and loads "text/html" my $nothing = "''"; my $user_browser; @@ -658,7 +665,7 @@ sub javascript_docopen { if ($user_browser eq 'safari' && $user_os =~ 'mac') { $nothing = "document.clear()"; } else { - $nothing = "document.open('text/html','replace')"; + $nothing = "document.open('$mimetype','replace')"; } return $nothing; } @@ -868,7 +875,7 @@ sub Create_PrgWin { function openpopwin () { popwin=open(\'\',\'popwin\',\'width=400,height=100\');". "popwin.document.writeln(\'".$start_page. - "