str to time code example
Example 1: php start of day epoch
$beginOfDay = strtotime("today", $timestamp);
$endOfDay = strtotime("tomorrow", $beginOfDay) - 1;
Example 2: php date strtotime format
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
Example 3: strtotime format
$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
Example 4: str to datetime time
>>> import datetime
>>> datetime.datetime.strptime('03:55', '%H:%M').time()
datetime.time(3, 55)