for readonly version we only need to fetch given timezone, automatic conversion from id

This commit is contained in:
Ralf Becker 2011-08-04 11:07:09 +00:00
parent 1a7eee9af8
commit 2cc88e8ae5

View File

@ -444,7 +444,18 @@ class select_widget
break;
case 'select-timezone': // options: #rows,$type
$cell['sel_options'] = $type ? egw_time::getTimezones() : egw_time::getUserTimezones($value);
if (is_numeric($value))
{
$value = calendar_timezones::id2tz($value);
}
if ($readonly) // for readonly we dont need to fetch all TZ's
{
$cell['sel_options'][$value] = calendar_timezones::tz2id($value,'name');
}
else
{
$cell['sel_options'] = $type ? egw_time::getTimezones() : egw_time::getUserTimezones($value);
}
break;
}
if ($rows > 1)