summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 112dc32)
raw | patch | inline | side by side (parent: 112dc32)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jul 2007 07:06:31 +0000 (07:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 16 Jul 2007 07:06:31 +0000 (07:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6869 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_timezones.inc | patch | blob | history | |
plugins/personal/samba/class_sambaLogonHours.inc | patch | blob | history |
index c928de5abe16e43bb184e00125df54a7fa45c26e..b3db5a33467aea5afed517a21d108fafc9471b9a 100644 (file)
'Pacific/Wallis' => 43200,
'Pacific/Yap' => 36000 );
- $timezones_dst = array (
+ $_unused_timezones = array (
'America/Adak' => 1,
'America/Atka' => 1,
'America/Anchorage' => 1,
if($selected != NULL){
foreach($timezones as $timezone => $value) {
if (preg_match("#".normalizePreg($timezone)."#i",$selected)){
- return($tz_arr[$timezone] = array('name'=>$timezone,'value'=>$value));
+ return($tz_arr[$timezone] = array('name'=>$timezone,'value'=>$value / (60*60)));
}
}
- foreach($timezones_dst as $timezone => $value){
- if (preg_match("/".normalizePreg($timezone)."/i",$selected)){
- return($tz_arr[$timezone] = array('name'=>$timezone,'value'=>$value));
- }
- }
}else{
foreach($timezones as $timezone => $value) {
- $tz_arr[$timezone] = array('name'=>$timezone,'value'=>$value);
- }
- foreach($timezones_dst as $timezone => $value) {
- $tz_arr[$timezone] = array('name'=>$timezone,'value'=>$value);
+ $tz_arr[$timezone] = array('name'=>$timezone,'value'=>($value / (60*60)));
}
}
return $tz_arr;
diff --git a/plugins/personal/samba/class_sambaLogonHours.inc b/plugins/personal/samba/class_sambaLogonHours.inc
index f9ffa96012d4bfd03189917ec724aa3b498c470e..f889e95cfc2c1e475206c9a2f7483aab259d9276 100644 (file)
plugin::plugin($config,$dn);
$this->sambaLogonHours = $slh;
- /* Get Timezone to be able to shift to the correct beginning */
- if(isset($this->config->current['TIMEZONE'])){
- $this->timezone = $this->config->current['TIMEZONE'];
- $tz = $this->config->current['TIMEZONE'];
- $tz_a = timezones_array($tz);
-
- if(!count($tz_a)){
- $this->timezone = 0;
- print_red(sprintf(_("The configured timezone '%s' seems not to valid."),$tz));
- }else{
- $this->timezone = $tz_a['value'] / (60*60);
- }
- }
+ /* Get default timezone */
+ $zone = get_default_timezone();
+ $this->timezone = $zone['value'];
/* Convert to bin */
$tmp = '';
function execute()
{
- print_a(get_timezone("Europe/Berlin"));
- print_a(get_default_timezone());
$week_days = array();
$week_days[0]= _("Sunday");