• Resolved l0gin

    (@l0gin)


    Is there any way to make a user’s subscription time based on local time?

    I’m using a shortcode to display the subscription expiration time, but the time is displayed in UTC.
    [pms-subscription-info key=”expiration_date”]

    Of course I have my timezone set in WordPress settings but it doesn’t have any output for PMS time.

    It offers a 24-hour subscription, so it is quite important that the subscription time is displayed correctly. I am currently shifted by 2 hours.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support alexandrubodea

    (@alexandrubodea)

    Hi @l0gin,

    What we have is the “WordPress Date Format” setting (found in Paid Member Subscriptions -> Settings -> Misc -> Others), which will display the dates from PMS in the format you’ve chosen in the WordPress Settings -> General page. Unfortunately, it seems that this setting is not currently working for the PMS Subscription info shortcode, but I’ve created a task and forwarded it to our development team, where they will get it fixed in one of our future updates to Paid Member Subscriptions (we release a new update every two weeks, so the fix will come in one of these future updates).

    Best regards,

    Thread Starter l0gin

    (@l0gin)

    I found the “Use WordPress date format” function not long after starting this topic here but it doesn’t change much. The option was selected and yet the subscription time is calculated according to GTM time and not local time. This is confirmed by the entry of the record in the database. The time displayed on the front-end using the short code coincides with the time that is in the database, so I think it is not a short code error, but that “Use WordPress date format” does not work.

    View post on imgur.com

    • This reply was modified 1 year, 8 months ago by l0gin.
    Plugin Support alexandrubodea

    (@alexandrubodea)

    Hi @l0gin

    In the DB the time should be saved in UTC, but in the front-end it should be displayed based on the “Timezone” setting from Dashboard -> Settings -> General. We’ve updated the code from the documentation and now it should work correctly. Please copy again the code from there and check if now the subscription info shortcode displays the appropriate time.

    Best regards,

    Thread Starter l0gin

    (@l0gin)

    Yes, that solved the problem. Now the time is displayed with the WorPress settings timezone selected. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing the time zone’ is closed to new replies.