Time Zone Adjustment - Access Log File

Discussion in 'Customization & add-ons' started by karyng01, Jul 19, 2012.

  1. karyng01

    karyng01 aMember Pro Customer

    Joined:
    Jul 30, 2008
    Messages:
    71
    Does anyone know a way so aMember automatically adjusts the access log file records time stamps to be in your local time zone?

    The hosting server is Pacific Time (3 hours behind) and our local time zone is Eastern Time. The access log file records all events in Pacific Time (where the hosting server is located) inside of aMember.

    It would be a helpful feature if you could set a time adjustment in aMember and have it auto adjust the server time zone access log file.
  2. mikhailjb

    mikhailjb New Member

    Joined:
    Jul 31, 2012
    Messages:
    16
    You need to overide the settings in your hosting server.

    This can be done by creating or modifying the existing .htaccess file in the root of your web server ie the place where you upload your html files.

    Add the following line in the newly created or existing .htaccess with:
    php_value date.timezone "Australia/Victoria"

    For a list of timezone in the correct format for your local zone look here http://www.php.net/manual/en/timezones.php

    Regards,

    Mikhail

    http://www.smos.mobi
  3. karyng01

    karyng01 aMember Pro Customer

    Joined:
    Jul 30, 2008
    Messages:
    71
    Mikhail

    Thanks so much for this solution, much appreciated.

    Aly
  4. karyng01

    karyng01 aMember Pro Customer

    Joined:
    Jul 30, 2008
    Messages:
    71
    On testing I found the suggested command didn't work (don't know why but gave an internal server access errror) but you gave me the idea to adjust timezone via htaccess and on researching found that another command did work in the htaccess file.

    SetEnv TZ America/New_York

    Here is a list of timezones:
    http://www.htaccess-guide.com/setting-server-timezone/

    Testing a login now shows the access log file in local Eastern time. It doesn't adjust prior entries but new entries are now logged in the Eastern Time Zone so thank you for helping me figure a solution out.
  5. mikhailjb

    mikhailjb New Member

    Joined:
    Jul 31, 2012
    Messages:
    16

Share This Page