• Resolved disturbed-pixel

    (@disturbed-pixel)


    Hi @hwk hope you’re well

    I seem to be experiencing modifications to the date/time values entered by a user when submitting a form.

    On a ACFE Form submission the values of

    Date picker
    Repeater -> Date picker
    Repeater -> Time picker

    Are all being modified by -1. So all Date fields in the form are being modified

    Input value in field: 30/05/2022
    Field value in DB: 29/05/2022

    The same applies to the time

    Input value in field: 11:15am
    Field value in DB: 10:15am

    I’ve checked there’s no hooks, one action acfe/form/submit/post (which is after the values have been entered into the DB (?)

    All it does it gets the values and pushes some of them to Google Sheets. (none of which are the dates/times)

    What else could be modifying my dates/times by “1”?

    ACF Pro v 5.12
    ACFe v0.8.8.7

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    I’m not sure how exactly you push your data from your Google Sheets, but the value of the Datepicker in the database should be in the following format: Ymd and not d/m/Y. See ACF Datepicker documentation.

    Regarding the -1 added everywhere, this is a very strange behavior, maybe you have some custom PHP timezone setting and use a function such as date_default_timezone_set() which notoriously mess with the WordPress date system. I would suggest to make some research in your installation files, just to be sure.

    Other than that, I would recommend to setup a clean WP install with ACF Pro and ACF Extended only and make the some test on it. If you prefer to keep your installation, then try to disable all your plugins one-by-one (at the exception of ACF Pro & ACF Extended) until you find which one cause the issue.

    If the problem persists, I would suggest to also switch to the native WP Twenty Twenty Two theme, just to make sure you don’t have any custom code in your theme that would break the feature.

    Hope it helps!

    Have a nice day!

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘ACFE Form dates being altered on post’ is closed to new replies.