The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Date and timestamp on access log difference

Discussion in 'General Discussion' started by headout, Oct 4, 2009.

  1. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    the user access logs (/home/cpaneluser/access-logs) have a different timestamp, compared to the server time/date.

    s01# date
    Sun Oct 4 22:49:53 CEST 2009

    WHM:
    Current Time
    Sun Oct 4 22:50:05 CEST 2009

    s01# tail -f /home/cpaneluser/access-logs/domainname.com
    ip address - - [04/Oct/2009:20:39:16 +0000]

    I already did an /scrips/upcp, but that didn't solve it.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Factoring out time zone differences (CEST currently being +0200), were you sure to visit that domain's website while you were performing this test to ensure the logs were updated? If not, that may explain the 10 minute discrepancy in the time (most recent visitor).
     
  3. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Hi, it's not the 10 minute discrepancy, but the timezone discrepancy.
    If i switch to another timezone (/Europe/London):
    date Mon Oct 5 21:45:44 BST 2009
    The logfiles still gets the fixed zone:
    83.163.148.136 - - [05/Oct/2009:20:47:30 +0000]

    The logfile is still an hour behind. When i switch back to /europe/amsterdam, it changes to two hours behind.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It appears that on the server that the Apache domlog is generated using timestamps in UTC rather than your local timezone, hence the fact the timezone is always +0000 for that log, and the times are adjusted accordingly to be correct for this timezone (-1 or -2 hours depending on the settings you have provided).
     
  5. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Ok, thanks for clearing that up. But how do i correct the domlogs to +0200?
     
  6. headout

    headout Well-Known Member

    Joined:
    Aug 20, 2003
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Anyone with an answer or advice?
     
Loading...

Share This Page