Wrong hour in upload view

Phoca Download - download manager
berenger
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 07 Feb 2015, 15:27

Wrong hour in upload view

Post by berenger »

Hi

On the upload screen on the front end, a wrong hour notification appears when a file is uploaded. The difference is exactly 1 hour: 13.00 instead of 14.00. On the back end, the hour notification is correct. The server timezone is set correctly. How can I display the correct time on the front end?
I'm using PD version 2.1.9 on Joomla!2.5.

Regards

Pierre
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong hour in upload view

Post by Jan »

Hi, can you paste a screenshot (e.g. per imgur) where exactly the time is displayed different?

Thank you, Jan
If you find Phoca extensions useful, please support the project
berenger
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 07 Feb 2015, 15:27

Re: Wrong hour in upload view

Post by berenger »

Hello Jan

I posted the screenshot on Imgur: http://i.imgur.com/zfhAfcQ.jpg. Hope you can help me.

Regards

Pierre
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48566
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Wrong hour in upload view

Post by Jan »

Hi, in:

components\com_phocadownload\views\user\tmpl\default_files.php

lince cca. 162

Try to change:

FROM:

Code: Select all

echo '<td align="center">'. $row->date .'</td>';
TO:

Code: Select all

echo '<td align="center">'. JFactory::getDate($item->date) .'</td>';

OR TO:

Code: Select all

$date 	= JFactory::getDate($item->date);
$date->setOffset($config->getValue('config.offset'));
echo '<td align="center">'. $date->toFormat().'</td>';
Jan
If you find Phoca extensions useful, please support the project
Post Reply