Good afternoon, there is a form from which I get the date in the format "yyyy-mm-ddTH: M". It is necessary to receive in a timestamp format. Made the function, but for some reason does not return the value imputed. Instead of the entered date, I get 1999. Please tell me, at what stage in the function did I make a mistake?
<?php $datic = '2016-06-10T10:10'; echo create_timestamp($datic); function create_timestamp($datic){ $date = str_replace("T", " ", $datic); //убираю лишнюю Т $strf = strftime('%Y-%m-%d %H:%M'); $dt = strptime ($date, $strf); return mktime($dt['tm_hour'], $dt['tm_min'], $dt['tm_sec'], $dt['tm_mon'], $dt['tm_mday'], $dt['tm_year']); } ?>