EFA-configure system time wrong

Questions and answers about how to do stuff
Post Reply
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

EFA-configure system time wrong

Post by ktango »

Hello,

I just setup a new EFA box but it looks like the system time is wrong. I'm set my time zone as US Pacific using PDT. For example: the local time now is 6:01pm. My last message seen leaving was timestamped at 10:33:06. I used date to manually change the system time it looks like message time stamps are still wrong.
Any hints?

Thanks,
ktango
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

Re: EFA-configure system time wrong

Post by ktango »

I've been looking at my own problem and was able to find out some info. Hopefully this is useful to get some assistance.

The message time stamps that I'm seeing on http://localhost/mailscanner/status.php seems to grabbed from the file:
/var/www/html/mailscanner/status.php

The time stamp for processed messages comes from the maillog table.
$sql = "
SELECT
id AS id2,
hostname AS host,
DATE_FORMAT(timestamp, '".DATE_FORMAT."<br>".TIME_FORMAT."') AS datetime,
from_address,
to_address,
subject,
size as size,
isspam,
ishighspam,
spamwhitelisted,
spamblacklisted,
virusinfected,
nameinfected,
otherinfected,
sascore,
report,
ismcp,
issamcp,
ishighmcp,
mcpsascore,
'' AS status
FROM
maillog
WHERE
".$_SESSION['global_filter']."
ORDER BY
date DESC,
time DESC
LIMIT ".MAX_RESULTS;

===
At the moment, it seems like the timestamps that maillog table has is different from my system time.
It leads to wrong time stamps on outgoing/incoming messages. Ex: Current system time is 5:53pm DST but outgoing message sent a minute ago was 10:21:48.
Any hints on fixing the timestamps on maillog?

Thanks,
ktango
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: EFA-configure system time wrong

Post by shawniverson »

Is your system set to use UTC or local time?
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

Re: EFA-configure system time wrong

Post by ktango »

My system is set to use local time - Pacific time zone. But even if it was using UTC time, the minutes shouldn't be off though.. right?
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: EFA-configure system time wrong

Post by shawniverson »

What's the contents of the following file on your system?

/etc/sysconfig/clock
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

Re: EFA-configure system time wrong

Post by ktango »

Hi Shawn,

UTC=false
ARC=false
ZONE=America/Los_Angeles
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: EFA-configure system time wrong

Post by shawniverson »

Change UTC=false

to

UTC=true

Restart EFA and see what happens.
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

Re: EFA-configure system time wrong

Post by ktango »

Hi Shawn,

I've made your suggested mod and rebooted but it didn't work.

UTC=true
ARC=false
ZONE=America/Los_Angeles

ktango
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: EFA-configure system time wrong

Post by shawniverson »

Another thought....

Head over to

/var/www/html/mailscanner/conf.php

Is this present?

Code: Select all

define('TIME_ZONE', 'America/Los_Angeles');
ktango
Posts: 7
Joined: 29 Mar 2014 19:15

Re: EFA-configure system time wrong

Post by ktango »

Shawn,

It's defined in conf.php

Code: Select all

// Set Time Zone
define('TIME_ZONE', 'America/Los_Angeles');
Should I change it to UTC too?

like this?

Code: Select all

date_default_timezone_set();
Thanks,
ktango
User avatar
shawniverson
Posts: 3650
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: EFA-configure system time wrong

Post by shawniverson »

Give it a try and let me know what happens...If it doesn't work, change it back and let me know.
Post Reply