forked from extern/egroupware
* Filemanager: Put file creation & modification times in user timezone
This commit is contained in:
parent
85c7442c3f
commit
08c5cf293f
@ -991,6 +991,12 @@ class filemanager_ui
|
|||||||
$row['download_url'] = Vfs::download_url($path);
|
$row['download_url'] = Vfs::download_url($path);
|
||||||
$row['gid'] = -abs($row['gid']); // gid are positive, but we use negagive account_id for groups internal
|
$row['gid'] = -abs($row['gid']); // gid are positive, but we use negagive account_id for groups internal
|
||||||
|
|
||||||
|
foreach(['mtime','ctime'] as $date_field)
|
||||||
|
{
|
||||||
|
$time = new Api\DateTime($row[$date_field],Api\DateTime::$server_timezone);
|
||||||
|
$time->setUser();
|
||||||
|
$row[$date_field] = $time->format('ts');
|
||||||
|
}
|
||||||
$rows[++$n] = $row;
|
$rows[++$n] = $row;
|
||||||
$path2n[$path] = $n;
|
$path2n[$path] = $n;
|
||||||
}
|
}
|
||||||
@ -1408,6 +1414,14 @@ class filemanager_ui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Times are in server time, convert to user timezone
|
||||||
|
foreach(['mtime','ctime'] as $date_field)
|
||||||
|
{
|
||||||
|
$time = new Api\DateTime($content[$date_field],Api\DateTime::$server_timezone);
|
||||||
|
$time->setUser();
|
||||||
|
$content[$date_field] = $time->format('ts');
|
||||||
|
}
|
||||||
|
|
||||||
// mergeapp
|
// mergeapp
|
||||||
$content['mergeapp'] = static::get_mergeapp($path, 'self');
|
$content['mergeapp'] = static::get_mergeapp($path, 'self');
|
||||||
$content['mergeapp_parent'] = static::get_mergeapp($path, 'parents');
|
$content['mergeapp_parent'] = static::get_mergeapp($path, 'parents');
|
||||||
|
Loading…
Reference in New Issue
Block a user