aMember "changes day" at UTC time vs. server time

Discussion in 'Troubleshooting' started by ntsmedia, Apr 3, 2015.

  1. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    14
    I have submitted a TT to aMember regarding this but while awaiting for them to open and review the matter I am wondering if this has been seen by any other aMember users?

    In brief, aMember is changing the day at midnight UTC time rather than at midnight using the server's time (server is not set to UTC). This means that drip content setup for release on the user's day 1, 2, 3, etc. is moving to the next day on UTC time!

    I have never seen this happen with member v3 and am not even aware of a time setting in member 3 or 4 ... it always used the server's time setting. In fact, aMember correctly shows the server's time setting in the admin CP (v4 for certain).

    I am working on development with aMember v4 and happened to notice this happen quite by accident where a test user moved to the next day when they shouldn't have. I assumed it was a quirk of v4 I would ultimately need to resolve and didn't look into it right away.

    But, it now turns out that our live v3 system is also doing this and it definitely did not behave that way in the past. The only known difference is that v4 was installed a while ago to start development on the same server within the same domain.

    Any thoughts?

    Regards,
    John
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    May be totally wrong here but I think aMember follows set PHP timezone so go to admin>utilities>System Info and check if date, time, and timezone are correct.

    Then go Admin>Configuration>Languages and check if 'Available' and 'Default' locales are correctly set.
  3. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    14
    Thanks ... I checked them both (aMember4). I had "English" as the default but don't want multiple languages however to see what would happen I set both options to "U.s. English" ... no change.

    I have attached a screenshot showing the admin Version info (aMember v4) on the left where the time zone for the server is showing correct. And on the right is a text widget in Wordpress (integrated with aMember v4) with php code to pull date/time/time zone and below that are some extra shortcodes that pull date/time again and then what WordPress is set for. Very puzzling.

    If I put the same php code in a simple php page on the server it gives correct date time, not UTC!

    Thanks,
    John

    Attached Files:

  4. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    Panel on right hand side of your image has three different times - 20:35, 08:35 and 02:35 strange.
  5. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    14
    Actually just two ... 20:35 (military or European format) is 08:35 pm ... I was just using both php code and WordPress shortcodes to pull the same info thought the time formatting was different.

    But those times were UTC at the time of the screen capture and the 02:35 pm was the correct server time. The issue is that aMember is changing the user's "day" based upon the UTC midnight rather than the server time midnight as it seems to think the "server time" is UTC in Wordpress but it doesn't think it is UTC from the admin server info screen.

    Thanks,
    John
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    John,
    Do you have php.ini files in your wordpress root, aMember root or site root folders?
  7. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    14
    Hi Alexander,

    I don't manage the server for this client anymore but I think the php.ini file is only located in /usr/local/lib/php.ini and thus, is server-wide.

    The aMember TT response from Anton suggested I put:

    date_default_timezone_set('America/Denver');

    in the aMember config files (v3 and v4) which I am testing out in aMember v4.

    Regards,
    John
  8. microlinx

    microlinx aMember Pro Customer

    Joined:
    Oct 26, 2004
    Messages:
    246
    Any update on this? I am having similar problems since moving to a shared account (thanks to Google stripping down our traffic to almost nothing) I digress...

    Amember SHOULD have a time zone setting to handle this very simple but essential time requirement.
  9. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    We have this in our to do list and this functionality will be implemented in next releases. Right now you can only change this via php.ini
  10. ntsmedia

    ntsmedia aMember Pro Customer

    Joined:
    Dec 11, 2006
    Messages:
    14
    Hi Alexander ... what is puzzling is when did this start to behave like this? I know that aMember v3 (still running our live site while we develop a completely new version based upon aMember v4) always used to "change days" at server midnight without anything specific done in the php.ini file.

    And, by chance would the future plans include the ability for the member to specify their time zone and have the "day change" at their time zone's midnight or just one setting for the aMember system itself? Would this be possible as a custom development project?

    Many Thanks,
    John
  11. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    i used godaddy and is 10 hours behind uk time and even changing php files to London time zone did nothing.

    also for UK time, you must have "English British" for date as in 29/05 then 05/29

    i requested in the bug reports ect as per other post
    that we have a time and date at top right in ACP so we can see what the script/software thinks the date and time is and a way to change it from there, as in add or remove hours

    IMHO your site looks way wrong, as php saying one time, word press saying another and amember saying another

Share This Page