Wrong timestamp shown in Visitor

Osama Tariq

Well-Known Member
Nov 27, 2014
206
2
18
Lahore, Pakistan
cPanel Access Level
Root Administrator
Twitter
There's a bug found in visitor option in cpanel it shown wrong timestamp as i have check there's a right time shown in domlogs from commandline:

Code:
62.210.187.247 182.176.116.195 - - [23/Aug/2016:17:46:01 +0500] "GET /category/virtualization/ HTTP/1.1" 200 11716 "http://example.com/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0"
Moreover i have restarted httpd and mysql services as well and there's correct time in whm and global php.ini

date.timezone = Asia/Karachi
Please find attachment with wrong timestamp.
 

Attachments

Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello,

I've been unable to reproduce this issue on a test server. Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
I've been unable to reproduce the issue, as when I test this the correct date/time appears in "cPanel >> Vistors". Opening a support ticket will allow us to take a closer look at your system to determine why this is happening.

Thank you.
 

xprt5

Well-Known Member
Apr 6, 2003
72
0
156
Houston
Look at your domlogs file and you will see it lists two IP's in the front of each line and should only be one, the visitors.

Check your LogFormat settings in Apache and you will find it set incorrectly.

Should look like this with %a %l %u %t

<IfModule mod_log_config.c>
LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a %l %u %t \"%r\" %>s %b" common

Your LogFormat is incorrect and causing latest visitors date/time to show incorrectly as it reads entries from the domlogs file by "spaces" and the extra local IP is throwing off the format.

Edit httpd.conf with above and restart apache then check latest visitors again.
 

xprt5

Well-Known Member
Apr 6, 2003
72
0
156
Houston
Also, you will need to manually edit the domlog files removing the 2nd local IP addresess, a quick sed search/replace will do this and new entries will be added correctly via Apache.