Date Field – the date is not always recorded correctly
-
I have a site used to schedule jobs for auto repair. It was running on an old server with an old PHP version 5.6. The Participants database plugin version was fairly old as well. When a job was scheduled, the scheduled date (a date field) could be entered with various formats such as Dec 25, 2022, or December 25, 2022 or 12/25/2022. The date was always displayed correctly, using the format under wordpress>settings>date format, when viewing any jobs.
I since have moved everything to a new server running PHP 7.3 and currently V2.1.1 of the PDB. After a while we started realizing that dates that were entered as Dec. 25, 2022 or December 25, 2022 showed correctly. However dates entered as 12/25/2022 would display as December 24, 2022 in this date field. So they were getting entered as a day earlier than what was entered.
I made the transition to the new server by creating a new site, installing PDB and the importing the records from the old site. This all seemed to work fine.
I tried changing the date format in wordpress settings and that does display the format differently, but when creating a job and entering a scheduled date, anything still entered with a format such as 12/25/2022 is still getting scheduled a day early, 12/24/2022.
I also added code from your blog that allows a record to be edited from the front end, so jobs can be “closed” when complete. That was done on the old server and new server, and although I don’t think that has anything to do with it, it is a change I made.
Any help you could provide is greatly appreciated. thank you,
bryan
The page I need help with: [log in to see the link]
- The topic ‘Date Field – the date is not always recorded correctly’ is closed to new replies.