date - php mktime from variable -
i have variable this:
$event_start_date_hour_iso = str_replace(':',', ',$event_start_hour).', 0, '.date('d, m, y', $event_start_day);
the echo
result of $event_start_date_hour_iso
11, 30, 0, 06, 02, 2016
. if next:
echo date(date_atom, mktime($event_start_date_hour_iso))
the result 2016-02-06t11:48:08+02:00
.
if do:
echo date(date_atom, mktime(11, 30, 0, 06, 02, 2016))
the result if correct:
2016-06-02t11:30:00+03:00
except +03:00
, utc+2.
what doing wrong? how put data variable , right answer?
i'm not sure understand problem. think have inverted month , day in mktime function.
mktime(hour, minute , second, month, day, year);
Comments
Post a Comment