• Resolved CompKing

    (@compking)


    Thanks for a great plug-in.

    Running into a logic problem.

    %today% incorrectly shows Sunday when today is Monday
    %now% shows the correct time in my current time zone
    %tomorrow% returns a blank result (along with all other variables which refer to tomorrow)

    As such
    I can’t do anything with tomorrow hours, and today’s hours are wrong as they show yesterday’s hours.

Viewing 15 replies - 16 through 30 (of 41 total)
  • Thread Starter CompKing

    (@compking)

    Looks better. I’ll do a more comprehensive test over the weekend. I think we are close, but I am still seeing something not quite right. I’ll try to isolate the issue for you..

    Plugin Author Design Extreme

    (@designextreme)

    @compking I’ve run through a few issues I spotted with a clean installation so the plugin will be more stable in version 1.8. Please check the development notes.

    Thread Starter CompKing

    (@compking)

    I’m back at the same issue again. It’s currently 7:30pm on a Thursday and the plugin is showing Friday as Now()

    I’ve set-up a test page for you to see exactly the output I am getting vs actual values.

    What is also strange, is on my live site even though it thinks it’s Friday, the “%if_closed_now%” is showing True, even though 7:30pm falls into the open hours for Friday [the wrong day]

    Test site:
    https://test.northmountliquor.ca/sample-page/

    • This reply was modified 4 years, 5 months ago by CompKing.
    Plugin Author Design Extreme

    (@designextreme)

    @compking I will release the next version very soon (probably today) and it should fix the remaining discrepancies around the replacement text and the conditional shortcodes.

    Plugin Author Design Extreme

    (@designextreme)

    @compking Please update to version 1.10. I’ve performed a number of tests in this version to remove some issues – now all timestamps are set to the local midnight value and it all runs from this value. If you spot any issues at all, please let me know?

    Thread Starter CompKing

    (@compking)

    Thanks so very much. Will let you know. I’ll know more towards the end of the day, as that seems to be when problems surface..

    Plugin Author Design Extreme

    (@designextreme)

    @compking The problems surfacing at the end of the day are the clue – the timestamp was previously set to midnight GMT and this arrived before the local midnight. The new version is more consistent with its approach – all timestamps use the local midnight (in your case 5 hours x 3600 seconds more).

    Thread Starter CompKing

    (@compking)

    Same thing again today. It’s Wednesday and plugin thinks it’s Thursday.

    I’ll attach a screen shot. Same production and test links

    Screen Shot

    Reminder: Timezone GMT-6 “Edmonton”

    • This reply was modified 4 years, 5 months ago by CompKing.
    Thread Starter CompKing

    (@compking)

    P.S. On 1.11 in both dev and production

    Plugin Author Design Extreme

    (@designextreme)

    @compking Thanks for getting back to me about this – I really thought this issue was resolved. I was using your timezone as one of the testing timezones.

    I’ll have another look, find out what it could be and resolve it with a new update.

    Plugin Author Design Extreme

    (@designextreme)

    @compking The development version has been updated. When I perform the tests on my server the days align properly. Can you have a look with the updated files to see that it’s working for you?

    Thread Starter CompKing

    (@compking)

    Thanks. I think I have captured the development changes. I’ll update the files AFTER I get the incorrect results towards the end of the day so I can see if the changes work.

    Thread Starter CompKing

    (@compking)

    As of 9pm local time, once again it is showing tomorrows days. Same test site. Updated 3 files [widget.php, index.php, opening-hours.pot] from dev. Did I miss something?

    Test site:
    https://test.northmountliquor.ca/sample-page/

    • This reply was modified 4 years, 5 months ago by CompKing.
    Plugin Author Design Extreme

    (@designextreme)

    @compking You have the current files. Thanks for looking into this. I will do further testing here to isolate the issue.

    Plugin Author Design Extreme

    (@designextreme)

    @compking I’ve updated the development version of the plugin.

    I spotted the error – the date function that sets “yesterday”, “today” and “tomorrow” was not using the local day as a base, rather the current day in GMT. At the moment, I haven’t tested it fully (i.e. GMT is a new day; GMT – X isn’t). Please can you download this and see how it fares?

    Thank you! ??

Viewing 15 replies - 16 through 30 (of 41 total)
  • The topic ‘Days are off’ is closed to new replies.