Home › Forums › General Issues › Time Field and WP 5.3
Hey,
Is anyone else having issues with the ACF time field values being changed on save with the WordPress 5.3 update?
I have Regina set as the timezone in the WordPress settings and whenever I save an ACF time value it moves it 6 hours ahead. It’s currently 6pm in Regina so not sure if that relates.
Example 10am turns into 4pm and 5:30pm turns into 11:30pm
-Lee
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.
Yep same issue here.
Dates are correct, but hours always get pushed back 1 hour.
Same here; The clue could be that the hours are being pushed 5 hours foreward for me, and I am in EST.
I figured out the issue I was having. I was using date_default_timezone_set() to set the default timezone in my functions.php file. Removing this made the times go back to the correct ones. I guess there’s some sort of conflict with using this PHP function and WordPress 5.3’s new date and time improvements.
In my case I need to use this date_default_timezone_set() function, otherwise my days are off.
So this is not specifically an ACF issues, but a WP5.3 issue with the change in the date_i18n() function?
if change de date_i18n() from de ACF plugin files to wp_date()
I think it works, don’t forget to backup the ACF dir.
source: https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/
That is not a solution, but a workaround not usable in many cases.
This workarround works for me. I change date_i18n() to wp_date() in api-helpers.php and i get back “real” time on my site.
You must be logged in to reply to this topic.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.