forked from extern/egroupware
Fix Infolog timezone issue again
This commit is contained in:
parent
e9cdcbcac8
commit
de36a7d40a
@ -912,12 +912,17 @@ class infolog_bo
|
|||||||
function &search(&$query)
|
function &search(&$query)
|
||||||
{
|
{
|
||||||
//echo "<p>boinfolog::search(".print_r($query,True).")</p>\n";
|
//echo "<p>boinfolog::search(".print_r($query,True).")</p>\n";
|
||||||
foreach ($this->timestamps as $key)
|
if (!isset($query['date_format']) || $query['date_format'] != 'server')
|
||||||
{
|
{
|
||||||
$key = substr($key, 5);
|
if (isset($query['col_filter']))
|
||||||
if (!empty($query[$key]))
|
|
||||||
{
|
{
|
||||||
$query[$key] = egw_time::user2server($query[$key],'ts');
|
foreach ($this->timestamps as $key)
|
||||||
|
{
|
||||||
|
if (!empty($query['col_filter'][$key]))
|
||||||
|
{
|
||||||
|
$query['col_filter'][$key] = egw_time::user2server($query['col_filter'][$key],'ts');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -939,15 +944,18 @@ class infolog_bo
|
|||||||
{
|
{
|
||||||
$time = new egw_time($data[$key], egw_time::$server_timezone);
|
$time = new egw_time($data[$key], egw_time::$server_timezone);
|
||||||
if ($key == 'info_enddate') $time->setTime(0, 0,0 ); // Set due date to 00:00
|
if ($key == 'info_enddate') $time->setTime(0, 0,0 ); // Set due date to 00:00
|
||||||
if ($time->format('Hi') == '0000')
|
if (!isset($query['date_format']) || $query['date_format'] != 'server')
|
||||||
{
|
{
|
||||||
// we keep dates the same in user-time
|
if ($time->format('Hi') == '0000')
|
||||||
$arr = egw_time::to($time,'array');
|
{
|
||||||
$time = new egw_time($arr, egw_time::$user_timezone);
|
// we keep dates the same in user-time
|
||||||
}
|
$arr = egw_time::to($time,'array');
|
||||||
else
|
$time = new egw_time($arr, egw_time::$user_timezone);
|
||||||
{
|
}
|
||||||
$time->setTimezone(egw_time::$user_timezone);
|
else
|
||||||
|
{
|
||||||
|
$time->setTimezone(egw_time::$user_timezone);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$data[$key] = egw_time::to($time,'ts');
|
$data[$key] = egw_time::to($time,'ts');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user