• Resolved mendelistickmend

    (@mendelistickmend)


    First of all, I would like the thank the developers of this great plugin, but I have a problem I could not find its solution

    I hhave this two codes([wpdts-custom format=”d/m/Y”], [wpdts-custom format=”d/m/Y” start=”-1 day”]) on my blog, [wpdts-custom format=”d/m/Y”] means today and [wpdts-custom format=”d/m/Y” start=”-1 day”] means yesterday but once is 12am, [wpdts-custom format=”d/m/Y”] changes to today’s date but [wpdts-custom format=”d/m/Y” start=”-1 day”] doesn’t change till 1/2 am, what could be the problem?

Viewing 12 replies - 16 through 27 (of 27 total)
  • Plugin Author Denra.com

    (@denra)

    Hello again @mendelistickmend,

    You should not change the time zone from the theme’s functions.php, the WordPress config file or wp-settings.php. You must do it in the General Setting in the admin area of the website.

    Thread Starter mendelistickmend

    (@mendelistickmend)

    Still didn’t work, look at the results I got for today, yesterday still won’t change till 1am but today already changed to today’s date

    Thread Starter mendelistickmend

    (@mendelistickmend)

    Now 1am and yesterday have finally changed

    Plugin Author Denra.com

    (@denra)

    Hello @mendelistickmend,

    I tested several types of start attributes. The only one that does not work is the one you are using above in your example. It is probably because you are not actually setting a start date from which to subtract 24 hours (today, yesterday, etc.), so the PHP strtotime() function (used in the plugin) uses the UTC as starting time zone for the initial date and time. (It is also normal if you have UTC set as your time zone by some code somewhere.) By default, the WP Date and Time Shortcode plugin uses the WordPress time in its time zone set in the General Settings.

    Here are the tested sample shortcodes:

    and the result:

    As you can see all others, except 3, work correctly. I have placed the time in the samples, so you may see that the time is actually always set to 00:00:00 (12:00 am) which leads to subtracting exactly 24 hours in all cases. Please try those and if the problem persists then follow the troubleshooting I mentioned above by changing the theme with a default one and deactivating all plugins which may be causing a conflict.

    Thread Starter mendelistickmend

    (@mendelistickmend)

    received your last reply in my email but can’t find it here??

    Thread Starter mendelistickmend

    (@mendelistickmend)

    I’ll try the codes you listed above code by 12am tomorrow and show you results again

    Thread Starter mendelistickmend

    (@mendelistickmend)

    Hello is midnight, and this is what I got with your code

    Plugin Author Denra.com

    (@denra)

    Hello @mendelistickmend,

    I have found out what is the problem. It is related to the start attribute UNIX timestamp and WordPress timestamp time zone difference. Currently you will always need to add or subtract hours for the difference between UTC and the current WordPress time zone (+0100, -0200, etc.) if you do not use the default start attribute which equals the current time (now). However, adding or subtracting hours with such a purpose is not a good practice and is not recommended, so I will be working on a fixed version which will be released in the coming days. Thank your for reporting the bug and for your patience!

    Thread Starter mendelistickmend

    (@mendelistickmend)

    Thank you for your time, I will mark this as resolved once the new update is released and it the problem is fixed

    Plugin Author Denra.com

    (@denra)

    Hi @mendelistickmend,

    The new version 2.6 was released today. Please check if everything works as expected now.

    Thread Starter mendelistickmend

    (@mendelistickmend)

    I just can’t stop smiling, everything is now fixed, thank you so much for all you do, am super grateful

    Plugin Author Denra.com

    (@denra)

    Thank you for using our plugin! Good luck!

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Please Help Me’ is closed to new replies.