Localised time of files and folders

Phoca Commander - dual panel file manager for Joomla! CMS
lpatrick
Phoca Enthusiast
Phoca Enthusiast
Posts: 86
Joined: 13 Feb 2024, 17:00

Localised time of files and folders

Post by lpatrick »

Jan

I think if you add this to the admin/views/phocacommanderfilesa/view.json.php

Code: Select all

use Joomla\CMS\HTML\HTMLHelper;
And then change the dates for folder (277) and file (294) from

Code: Select all

	$o .= '<td class="ph-date">'.date('Y-m-d H:i', $v['date']).'</td>';
to

Code: Select all

	$o .= '<td class="ph-date">'.HTMLHelper::date($v['date'],'Y-m-d H:i:s').'</td>';
Then the modified time should be correct according to the user's (Administrator) locale settings.

Hope I'm not wrong. Seems to work for me.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Localised time of files and folders

Post by Jan »

Hi, thank you for the info, I will take a look at it for the next version.

Jan
If you find Phoca extensions useful, please support the project
Post Reply