Submission entries show wrong time.

By: Jared White | Asked: 05/20/2022
ForumsCategory: General questionsSubmission entries show wrong time.
Jared White asked 2 years ago
Howdy,      My users are submitting a form with a time entry for say 6pm, and in the entries, it shows as 12am. The timezone is offsetting correctly in the log of submissions, and changing the setting does not seem to change the behavior anyways, any idea what I can do?   Server is set to UTC, wordpress tz data is set to offset for our timezone. PHP is set to UTC as well.   How can I make the submitted answers reflect the time selected rather than being offset?   PS: I tried search with no luck, if there's another thread about it just pass me a link please, trying to solve asap.
1 Answers
Best Answer
Victor Font answered 2 years ago
I've never run into this issue before. I'm not 100% certain, but I believe Formidable gets the date from PHP, not WordPress. I would try setting PHP to the desired timezone and test. You'll need to find out from your host how to change the PHP time zone.
Jared White replied 2 years ago

PHP had its setting correct, but many places in the other plugins were manually flipping tz from default to utc and back.

Added a plugin to pass

"date_default_timezone_set('MyTZ');"

On init.

Thanks, you got me headed the right way.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right