Date fields saving the wrong date from front-end form I have a front-end form with two date fields. After upgrading to Craft 3 and implementing what I believe to be all the changes concerning front-end forms in Craft 3 I am experiencing some odd behavior.

The odd behavior

When I enter manually or use jQuery UI Datepicker plugin to enter a desired date into any of the date fields associated with this front-end form (this is the only front-end form on the site currently), the date gets saved one day behind. E.g. if I enter 2018-05-01 it gets saved as 2018-04-30. However, if I go to the admin area and add a new block to this matrix field it saves correctly.

What I changed when upgrading from Craft 2 to 3 is the following:

{{ getCsrfInput() }}
&lt;input type="hidden" name="action" value="entries/saveEntry"&gt;


to

{{ csrfInput() }}
&lt;input type="hidden" name="action" value="entries/save-entry"&gt;


I also checked and confirmed that I am using the most up-to-date version of jQuery UI to rule out the datepicker as the culprit.

Here is a gist of the form: https://gist.github.com/swthate/08152aefe2c481cd792fc156a9ea1bc6

Note: fields/inputs in question are on line 38 and line 49 of the gist (lotMixDate and lotExpireDate).

Thanks!
You need to include a timezone parameter to your form in order to get the correct one.

&lt;input type="hidden" name="postDate[timezone]" value="America/Los_Angeles"&gt;


If you don't include something like this in your frontend chances are high you'll receive the wrong time because it adds/subtracts a certain amount of hours. As soon as you include a valid timezone it will calculate the correct time. Otherwise it will be set to the default system timezone which may differ from your local