PB with timezone in the dashboard and antivirus update

If you want to see time of the real last freshclam start , you should change file :

Looking at the Disk Usage, I have the sameā€¦

Actually, the date and time are 2015-10-14 22:39 ( at the top there only the time )
The update: 2015-10-15 01:38 at the butomā€¦

$timestamp = $stat[ā€˜mtimeā€™];
The same behavior in DUC.php mtime, so my suggestion maybe right

Check the PHP datetime is the same sa the system:

config getprop php DateTimezone
config show TimeZone

Reference:

1 Like

UTC

TimeZone=America/Belem

You just found the problem :wink:

Align the two values and youā€™re done.
I guess the right one is ā€œAmerica/Belemā€.

 config setprop php DateTimezone America/Belem
 expand-template /etc/php.ini

Reference: http://php.net/manual/en/timezones.america.php

It seem the problem is deeperā€¦

[root@microserver ~]# config setprop php DateTimezone America/Belem
[root@microserver ~]# expand-template /etc/php.ini
[root@microserver ~]# config getprop php DateTimezone
America/Belem
[root@microserver ~]# config show TimeZone
TimeZone=America/Belem

After a reconnection on the webgui, I still have the three hours of differenceā€¦
Did I need to reboot?

Finally, I rebootedā€¦

The Dashboard show the ā€œgoodā€ time for the antivirus updateā€¦ :smiley:

But the Disk Usage, still showing the UTC timeā€¦ :confused:

I suppose that config is prefferable to make through WEB UI , firstly set UTC then change to America / Belem and all config would be updated.

Oupsā€¦ Forget to return this information:
All is okay in the date and time module

I will try to made a change here when I come back at homeā€¦

Good, check the right answer and solve this thread :wink:

Noā€¦ The problem is only resolve in the Dashboard, not in the disk usage

Press Update on disk usage :slight_smile: for changing mtime :wink:

Noā€¦thatā€™s not work

PS: You can easily imagine that I canā€™t resist to click on this big red botton :laughing:

In /usr/share/nethesis/NethServer/Module/Duc.php

if($stat) {
                     $timestamp = $stat['mtime'];
                     $date = $this->getPhpWrapper()->gmdate($view->translate('Date_Format'), $timestamp);
            }

So what to do? Change ā€œmtimeā€ by what?

atime

did you reaply Time zone by NS WEB UI ?

Of course ā€¦ That is why I put the hands under the hood :anguished: :grin:

show pls

ll /var/cache/duc/

After editing the Duc.php and change mtime by atimeā€¦
Nothing newā€¦
The Disk Usage module still persist with the UTC time :alien:

In /var/cache/duc
thereā€™s only three files:
duc.db
duc.son
tree.xml