Form Expiration Date set in UTC
-
Hi there,
I have found an issue where the form expiration time will default to UTC instead of the WordPress timezone. Since there is no way to specify an actual time, this makes it so that the form will expire at midnight on the specified date in UTC, rather than my timezone. Since my timezone is “America/Vancouver”, this means the forms expire 8 hours earlier than intended(at 4pm the day before I set it to expire).
I figured out that this is because the functions being used for the time are the regular PHP functions (
strtotime
). However, WordPress sets the timezone to UTC, and then you need to use the WordPress functions to get the actual local times.I can for now simply hook into the
'forminator_cform_form_is_submittable'
and'forminator_cform_form_is_visible'
to override this behaviour, but I believe this feature should respect the set timezone, or at the very least specify that it uses UTC and allow setting of the time in addition to the date to account for this.I will post a reply once I have written my workaround in case others have this issue, so please leave the thread open so that I can do so.
Also, I’m using the latest version of Forminator, 1.15.11
Thanks!
- The topic ‘Form Expiration Date set in UTC’ is closed to new replies.