mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Format timezone option groups
This commit is contained in:
parent
3b5f64a4c3
commit
8f7783e97c
@ -41,7 +41,25 @@ class preferences_hooks
|
||||
{
|
||||
$langs = Api\Translation::get_installed_langs();
|
||||
|
||||
$tzs = Api\DateTime::getTimezones();
|
||||
$tz_list = Api\DateTime::getTimezones();
|
||||
|
||||
// Format for select
|
||||
$format = function ($key, $value) use (&$format, &$tzs)
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
$value = [
|
||||
'label' => $key,
|
||||
'value' => array_map($format, array_keys($value), array_values($value))
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = ['label' => $value, 'value' => $key];
|
||||
}
|
||||
return $value;
|
||||
};
|
||||
$tzs = array_map($format, array_keys($tz_list), array_values($tz_list));
|
||||
}
|
||||
|
||||
$date_formats = array(
|
||||
|
Loading…
Reference in New Issue
Block a user