Nas
(Artem Fedai)
October 14, 2015, 6:26pm
12
/usr/share/nethesis/NethServer/Module/Dashboard/SystemStatus/Antivirus.php
$fileList = glob('/var/lib/clamav/*.{cvd,cld}', GLOB_BRACE);
foreach ($fileList as $file) {
$changeTime = filemtime($file);
if ($changeTime > $max) {
$max = $changeTime;
so it shows ls -l /var/lib/clamav/.cld and ls -l /var/lib/clamav/ .cvd and calculate max date of the file changes in those dir , so it migth be the situation that after reboot of the server freshclam update bases before time complitely sync.
stat /var/lib/clamav/*.cvd
Nas
(Artem Fedai)
October 14, 2015, 7:04pm
13
If you want to see time of the real last freshclam start , you should change file :
Nas:
/usr/share/nethesis/NethServer/Module/Dashboard/SystemStatus/Antivirus.php
$fileList = glob(‘/var/lib/clamav/*.{cvd,cld}’, GLOB_BRACE);
foreach ($fileList as $file) {
$changeTime = fileatime($file);
if ($changeTime > $max) {
$max = $changeTime;
Jim
October 15, 2015, 1:44am
14
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…
Nas
(Artem Fedai)
October 15, 2015, 5:36am
15
$timestamp = $stat[‘mtime’];
The same behavior in DUC.php mtime, so my suggestion maybe right
giacomo
(Giacomo Sanchietti)
October 15, 2015, 7:22am
16
Check the PHP datetime is the same sa the system:
config getprop php DateTimezone
config show TimeZone
Reference:
1 Like
giacomo
(Giacomo Sanchietti)
October 15, 2015, 11:58am
18
You just found the problem
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
Jim
October 15, 2015, 4:10pm
19
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?
Jim
October 15, 2015, 4:24pm
20
Finally, I rebooted…
The Dashboard show the “good” time for the antivirus update…
But the Disk Usage, still showing the UTC time…
Nas
(Artem Fedai)
October 15, 2015, 5:39pm
21
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.
Jim
October 15, 2015, 6:09pm
22
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…
alefattorini
(Alessio Fattorini)
October 15, 2015, 9:34pm
23
Good, check the right answer and solve this thread
Jim
October 15, 2015, 10:12pm
24
No… The problem is only resolve in the Dashboard, not in the disk usage
Nas
(Artem Fedai)
October 15, 2015, 10:53pm
25
Press Update on disk usage for changing mtime
Jim
October 16, 2015, 9:42am
26
No…that’s not work
PS: You can easily imagine that I can’t resist to click on this big red botton
Jim
October 16, 2015, 6:39pm
27
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?
Nas
(Artem Fedai)
October 16, 2015, 6:42pm
29
did you reaply Time zone by NS WEB UI ?
Jim
October 16, 2015, 6:45pm
30
Of course … That is why I put the hands under the hood