All over sudden the datepicker field returns a wrong date, every datepicker field is one day too early. Even if I save the post, the saved data ist still one day early. It worked as expected before, just stumbled over that during a birthday cronjob. Am I overlooking something? Help is gladly appreciated.
$timezone = new DateTimeZone(get_option('timezone_string'));
$geburtsdatum = '19691123;
$geburtsdatum_dt = new DateTime($geburtsdatum , $timezone);
$birthdate = $geburtsdatum_dt->format(get_option( 'date_format' ));
which brings the correct date, but unfortunately in english language.
I of course can replace the month names in the strings, but that does not solve the root of the problem: The field in the backend is still showing the wrong date. Any thoughts on this? I am a bit in despair …
Viewing 2 posts - 1 through 2 (of 2 total)
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