src/helpers/DateTimeHelper.php
public static function makeTimestamp( $time ) {

		if( is_numeric($time) )
			return (int) $time;

		elseif( $time instanceof \DateTime )
			return $time->getTimestamp();

		$ts = strtotime($time);

		if( $ts === false )
			throw new \LogicException("Unable convert {$time} to a valid timestamp");

		return $ts;

	}
public static function makeTimestamp( $time ) {

		if( is_numeric($time) )
			return (int) $time;

		elseif( $time instanceof \DateTime )
			return $time->getTimestamp();

		$ts = strtotime($time);

		if( $ts === false )
			throw new \LogicException("Unable convert {$time} to a valid timestamp");

		return $ts;

	}
public static function makeTimestamp ( $ time ) { if ( is_numeric ( $ time ) ) return ( int ) $ time ; elseif ( $ time instanceof \ DateTime ) return $ time -> getTimestamp ( ) ; $ ts = strtotime ( $ time ) ; if ( $ ts === false ) throw new \ LogicException ( "Unable convert {$time} to a valid timestamp" ) ; return $ ts ; }
Convert a value to a timestamp.
@param  mixed $time
@return integer
Convert a value to a timestamp .