AdvancedCustomFields / AdvancedCustomFields/acf
get_field returns -1 day on front-end value for Date field
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
It appears somehow that get_field is returning -1 day in some cases while the value correct:


In stead of March 2nd, it shows March 1st which is not set as the date. This does not happen with PHP's date() and DateTime.

Changing the output format won't make it budge, it will keep displaying -1 day.
I am running the latest versions of ACF & ACF Pro (as of today) + Elementor Pro
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the get_field entry point and reproduce the reported Date field value on the front end using the stated ACF and ACF Pro versions. Compare its result with PHP's date() and DateTime behavior, including the configured output format. Done means the selected March 2 date is returned and displayed without shifting to March 1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100