• Hi there!

    We are using custom layouts on our site to display custom fields in specific formats. I have a layout on the page that is showing start and end date for a tour, but these dates are showing a day behind the actual date that was entered into the system (Nov 10 – 22). See another instance of the tour listing at the bottom of this page which states Nov 11 – 23: https://directory.journeywoman.com/tour-company/wild-nectar-immersive-travel-collection/

    Our WP time is set correctly, so I’m not sure why the custom field is changing the date for the specific layout?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @thefoxlife

    This sounds like a rounding issue (or perhaps a timezone offset issue) because it is incorrect by 1 day.

    Can you tell me:

    – how are you adding your custom fields?
    – the value of the custom field as it is saved in the database?

    Thanks

    Thread Starter thefoxlife

    (@thefoxlife)

    Sorry, I didn’t get an email to let me know you responded!

    1) the custom fields were added prior to our taking over the account – they are part of a custom plugin
    2) i’m not 100% where to look for the value in the database, I can’t seem to find the right table?

    Plugin Author Code Amp

    (@codeamp)

    Hey @thefoxlife

    No worries at all! Lets see if we can figure this out…

    So my approach would be to display the raw value of the custom field instead, temporarily, so we can see whats going on.

    In Custom Layouts, you can change your custom field from date to text… and this should display the raw value, unformatted…

    What I would do is add a secondary custom field to your template for this purpose (so we can see what our plugin is doin to it as a “date” and also what it is without any kind of processing/formatting)…

    Let me know when that’s up and I’ll take another look (and if you can’t do it on live, then please copy and pase the output here)

    Thanks

    • This reply was modified 2 years, 10 months ago by Code Amp.
    Plugin Author Code Amp

    (@codeamp)

    Also: would you be able to tell me which timezone is set in your WordPress install?

    Thread Starter thefoxlife

    (@thefoxlife)

    Okay! I think I’ve done it correctly.

    The raw data should show in the start field, and the layout with “date” shows in the end field: https://directory.journeywoman.com/womens-tour/made-by-hand-somerset-london/

    The dates should be as shown here (the tour is shown at the bottom of the page) https://directory.journeywoman.com/tour-company/rue-pigalle-artisanal-journeys/

    And our timezone is Toronto

    Universal time is 2022-05-27 16:09:48. Local time is 2022-05-27 12:09:48.

    This timezone is currently in daylight saving time.
    Standard time begins on: November 6, 2022 1:00 am.`

    Plugin Author Code Amp

    (@codeamp)

    Hey @thefoxlife

    I’ve just completed a big round of updates to Custom Layouts and now tackling this…

    However I can’t find the original Custom Layouts list anywhere (I checked your original link), have you moved on to another plugin?

    And to confirm, the dates seem to be stored YYYY-MM-DD?

    Thanks

    • This reply was modified 2 years, 9 months ago by Code Amp.
    Thread Starter thefoxlife

    (@thefoxlife)

    As far as I can tell we haven’t moved to a different plugin, when I look in the editor all your info is there

    And I’m going to say Yes, that’s how the date is being stored.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wrong dates being pulled’ is closed to new replies.