After all of this, I found a rogue instance of date_default_timezone_set("Europe/London");
in one of our plugin files.
When I have removed this everything is back to normal. Thanks for your help @elliot, this can be considered closed for me now.
Just to further update — I will figure this out 😃
@elliot — I think I’ve narrowed the issue down to something to do with Bedrock.
A default install of WordPress with the default theme displays the date correctly from the datepicker field.
I’m now going to install a default version of Bedrock with a default theme and see what this returns.
@elliot — unfortunately this hasn’t fixed it.
I can replicate the issue with this process:
Here’s a quick video: https://www.dropbox.com/s/n7d3b1iyhyc7scd/1.%20Setting%20Date.mov?dl=0
It may help to know that we use https://roots.io/bedrock/ as a boilerplate for a better WordPress structure, but all our WordPress themes are built from scratch.
I tried changing the WordPress theme to a default one and I still experienced the same issue.
Happy to open up a new support ticket if this doesn’t help!
It displays: November 18, 2019 8:30 am
We don’t use date_default_timezone_set()
in our themes and are experiencing this issue.
When I try to set a date to 2nd May 2020 it saves the value correctly in the database, but displays it incorrectly (a day behind) in both the admin screen and the front end of the site as per Elliot’s explanation.
I’m having this exact same issue and I was hoping to find a solution here.
When I set a date for 2nd May 2020 and hit save it resets the date to 1st May.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.