aMember showing incorrect time

Discussion in 'aMember Pro v.4' started by simonsays, Nov 6, 2012.

  1. simonsays

    simonsays aMember Pro Customer

    Joined:
    Aug 5, 2008
    Messages:
    45
    aMember logs are off by approximately 8 hours. For example, if someone makes a payment, the logs or payment receipt will show the time 8 hours greater than our time zone. Where exactly is aMember getting the time from?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    aMember uses time/timezone from the webhosting server.
  3. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543
    which variable does it pull from the server to determine that?

    specifically for adding new subscriptions to users manually (so what does it use to calculate Start Date for those)? (ticket UEY-88451-296)
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    aMember takes time from the server. So if server clocks show 1:30pm when payment inserted, it will appear as 1:30pm.

    Payment adding uses date/time from your browser/computer, so there may be difference (to be fixed in next vers ion). Try to run the following PHP script on the server:
    PHP:
    <?php
    echo date('Y-m-d H:i:s');
    it would be interesting to see output of the script compared to your computer date/time.
  5. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543
    it shows 2012-11-07 15:13:38, which is correct (as the server is in New York timezone), and my time is 12:13 instead (-3 hrs), but when I try and add a new subscription right now the Start Date ends up being 2012-11-06.

    now that's weird...
  6. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    When you setup dates on "add new access" screen, what date does it set? Can you copy/paste or screenshot what you see on the add screen before you hit button?
  7. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543
    yeah, this is what shows up... obviously dated back one day for some reason:

    [​IMG]
  8. press_enterprise

    press_enterprise aMember Pro Customer

    Joined:
    Aug 29, 2006
    Messages:
    26
    Not sure if you figured this out, but in case this helps - setting the timezone on your server may not be enough. I set mine on an Ubuntu server using tzselect and date reported the right date, yet aMember was still doing everything several hours off.

    Turned out I had to edit my php.ini and uncomment the date.timezone line and fill in the correct value for my server and reload apache2.

Share This Page