I'm trying to get the value from an HTML datetime-local input into a PHP variable as a timestamp.
Here is the HTML:
<input type="datetime-local" name="_gaddon_setting_date_time" value="2017-11-24T10:00" class="gaddon-setting gaddon-datetime-local" id="date_and_time_of_export">
Here is the PHP I am trying to use to get this value into a variable as a timestamp:
$date_and_time_field = mktime($form['autoexport_csv_addon']['date_and_time_of_export']);
$form is the object that this class can use to grab the value of the forms inputs.
The value is turned into a timestamp, but it is setting the time for January 26th, 2018 at 01:27:36 when the time selected is actually November 24th, 2017 at 10:00:00. Does anyone know why the datetime-local value isn't formatting properly for a timestamp conversion? Thanks very much!