mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 01:48:35 +01:00
Alarms for users in a different time zone than the server didn't work, so now the time in the table phpgw_async is stored in the time zone of the server, so that asyncservices can compare time() with this.
This commit is contained in:
parent
332edea855
commit
db890a0024
@ -98,6 +98,7 @@
|
||||
);
|
||||
$alarm['id'] = $this->so->save_alarm($cal_id,$alarm);
|
||||
$event['alarm'][$alarm['id']] = $alarm;
|
||||
$event['alarm'][$alarm['id']]['time'] = $alarm['time'] + $this->tz_offset; // allows viewing alarm time in users timezone
|
||||
|
||||
return $alarm;
|
||||
}
|
||||
|
@ -176,6 +176,7 @@
|
||||
}
|
||||
$alarm['cal_id'] = $cal_id; // we need the back-reference
|
||||
|
||||
$alarm['time'] -= $GLOBALS['phpgw']->datetime->tz_offset; // time should be stored in server timezone
|
||||
if (!$this->async->set_timer($alarm['time'],$id,'calendar.bocalendar.send_alarm',$alarm))
|
||||
{
|
||||
return False;
|
||||
|
@ -163,7 +163,7 @@
|
||||
continue;
|
||||
}
|
||||
$var = Array(
|
||||
'field' => $GLOBALS['phpgw']->common->show_date($alarm['time']-$this->bo->tz_offset),
|
||||
'field' => $GLOBALS['phpgw']->common->show_date($alarm['time']),
|
||||
//'data' => $alarm['text'],
|
||||
'data' => lang('Email Notification'),
|
||||
'owner' => $GLOBALS['phpgw']->common->grab_owner_name($alarm['owner']),
|
||||
|
@ -3326,7 +3326,7 @@
|
||||
{
|
||||
$icon = '<img src="'.$GLOBALS['phpgw']->common->image('calendar',($alarm['enabled']?'enabled':'disabled')).'" width="13" height="13">';
|
||||
$var = Array(
|
||||
'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']-$GLOBALS['phpgw']->datetime->tz_offset),
|
||||
'field' => $icon.$GLOBALS['phpgw']->common->show_date($alarm['time']),
|
||||
'data' => lang('Email Notification for %1',$GLOBALS['phpgw']->common->grab_owner_name($alarm['owner']))
|
||||
);
|
||||
$this->output_template_array($p,'row','list',$var);
|
||||
|
Loading…
Reference in New Issue
Block a user