version 1.33, 2005/04/18 22:17:45
|
version 1.35, 2005/11/10 19:19:51
|
Line 209 sub current_encoding {
|
Line 209 sub current_encoding {
|
my $default='UTF-8'; |
my $default='UTF-8'; |
if ($Apache::lonnet::env{'browser.os'} eq 'win' && |
if ($Apache::lonnet::env{'browser.os'} eq 'win' && |
$Apache::lonnet::env{'browser.type'} eq 'explorer') { |
$Apache::lonnet::env{'browser.type'} eq 'explorer') { |
$default=undef; |
$default='ISO-8859-1'; |
} |
} |
if ($lh) { |
if ($lh) { |
my $enc=$lh->maketext('char_encoding'); |
my $enc=$lh->maketext('char_encoding'); |
Line 259 sub get_language_handle {
|
Line 259 sub get_language_handle {
|
} |
} |
|
|
# ========================================================== Localize localtime |
# ========================================================== Localize localtime |
|
sub gettimezone { |
|
return ' ('.$Apache::lonnet::env{'server.timezone'}.')'; |
|
} |
|
|
sub locallocaltime { |
sub locallocaltime { |
my $thistime=shift; |
my $thistime=shift; |
if ((¤t_language=~/^en/) || (!$lh)) { |
if ((¤t_language=~/^en/) || (!$lh)) { |
return ''.localtime($thistime); |
return ''.localtime($thistime).&gettimezone(); |
} else { |
} else { |
my $format=$lh->maketext('date_locale'); |
my $format=$lh->maketext('date_locale'); |
if ($format eq 'date_locale') { |
if ($format eq 'date_locale') { |
Line 293 sub locallocaltime {
|
Line 296 sub locallocaltime {
|
'month','weekday','ampm') { |
'month','weekday','ampm') { |
$format=~s/\$$_/eval('$'.$_)/gse; |
$format=~s/\$$_/eval('$'.$_)/gse; |
} |
} |
return $format; |
return $format.&gettimezone(); |
} |
} |
} |
} |
|
|