mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
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";
|
||||||
|
if (!isset($query['date_format']) || $query['date_format'] != 'server')
|
||||||
|
{
|
||||||
|
if (isset($query['col_filter']))
|
||||||
|
{
|
||||||
foreach ($this->timestamps as $key)
|
foreach ($this->timestamps as $key)
|
||||||
{
|
{
|
||||||
$key = substr($key, 5);
|
if (!empty($query['col_filter'][$key]))
|
||||||
if (!empty($query[$key]))
|
|
||||||
{
|
{
|
||||||
$query[$key] = egw_time::user2server($query[$key],'ts');
|
$query['col_filter'][$key] = egw_time::user2server($query['col_filter'][$key],'ts');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -939,6 +944,8 @@ 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 (!isset($query['date_format']) || $query['date_format'] != 'server')
|
||||||
|
{
|
||||||
if ($time->format('Hi') == '0000')
|
if ($time->format('Hi') == '0000')
|
||||||
{
|
{
|
||||||
// we keep dates the same in user-time
|
// we keep dates the same in user-time
|
||||||
@ -949,6 +956,7 @@ class infolog_bo
|
|||||||
{
|
{
|
||||||
$time->setTimezone(egw_time::$user_timezone);
|
$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