EFA-configure system time wrong
EFA-configure system time wrong
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
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
Re: EFA-configure system time wrong
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
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
- shawniverson
- Posts: 3650
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: EFA-configure system time wrong
Is your system set to use UTC or local time?
Re: EFA-configure system time wrong
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?
- shawniverson
- Posts: 3650
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: EFA-configure system time wrong
What's the contents of the following file on your system?
/etc/sysconfig/clock
/etc/sysconfig/clock
Re: EFA-configure system time wrong
Hi Shawn,
UTC=false
ARC=false
ZONE=America/Los_Angeles
UTC=false
ARC=false
ZONE=America/Los_Angeles
- shawniverson
- Posts: 3650
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: EFA-configure system time wrong
Change UTC=false
to
UTC=true
Restart EFA and see what happens.
to
UTC=true
Restart EFA and see what happens.
Re: EFA-configure system time wrong
Hi Shawn,
I've made your suggested mod and rebooted but it didn't work.
UTC=true
ARC=false
ZONE=America/Los_Angeles
ktango
I've made your suggested mod and rebooted but it didn't work.
UTC=true
ARC=false
ZONE=America/Los_Angeles
ktango
- shawniverson
- Posts: 3650
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: EFA-configure system time wrong
Another thought....
Head over to
/var/www/html/mailscanner/conf.php
Is this present?
Head over to
/var/www/html/mailscanner/conf.php
Is this present?
Code: Select all
define('TIME_ZONE', 'America/Los_Angeles');
Re: EFA-configure system time wrong
Shawn,
It's defined in conf.php
Should I change it to UTC too?
like this?
Thanks,
ktango
It's defined in conf.php
Code: Select all
// Set Time Zone
define('TIME_ZONE', 'America/Los_Angeles');
like this?
Code: Select all
date_default_timezone_set();
ktango
- shawniverson
- Posts: 3650
- Joined: 13 Jan 2014 23:30
- Location: Indianapolis, Indiana USA
- Contact:
Re: EFA-configure system time wrong
Give it a try and let me know what happens...If it doesn't work, change it back and let me know.