public static function timestampFromDatepicker($date, $hour=NULL, $minute=NULL, $second=NULL) {
		
		/*
		 * TODO verify result with different timezones
		$dt = DateTime::createFromFormat('!d-m-Y', $date);
		if (is_a($dt, 'DateTime')) {
			$dt->setTime($hour, $minute, $second);
			$dt->getTimestamp();
		} else {
			return NULL;
		}
		*/

		$d = substr($date, 0, 2);
		$m = substr($date, 3, 2);
		$y = substr($date, 6, 4);
		$time = mktime($hour, $minute, $second, $m, $d, $y);
		
		return ($time ? $time : null);
		
	}
public static function timestampFromDatepicker($date, $hour=NULL, $minute=NULL, $second=NULL) {
		
		/*
		 * TODO verify result with different timezones
		$dt = DateTime::createFromFormat('!d-m-Y', $date);
		if (is_a($dt, 'DateTime')) {
			$dt->setTime($hour, $minute, $second);
			$dt->getTimestamp();
		} else {
			return NULL;
		}
		*/

		$d = substr($date, 0, 2);
		$m = substr($date, 3, 2);
		$y = substr($date, 6, 4);
		$time = mktime($hour, $minute, $second, $m, $d, $y);
		
		return ($time ? $time : null);
		
	}
public static function timestampFromDatepicker ( $ date , $ hour = NULL , $ minute = NULL , $ second = NULL ) { /*
		 * TODO verify result with different timezones
		$dt = DateTime::createFromFormat('!d-m-Y', $date);
		if (is_a($dt, 'DateTime')) {
			$dt->setTime($hour, $minute, $second);
			$dt->getTimestamp();
		} else {
			return NULL;
		}
		*/ $ d = substr ( $ date , 0 , 2 ) ; $ m = substr ( $ date , 3 , 2 ) ; $ y = substr ( $ date , 6 , 4 ) ; $ time = mktime ( $ hour , $ minute , $ second , $ m , $ d , $ y ) ; return ( $ time ? $ time : null ) ; }
Create timestamp of a DateTime object as returned by jQuery datepicker.

@param	string	Date in format dd-mm-yyyy.
@param	int		Optional hours.
@param	int		Optional minutes.
@param	int		Optional seconds.

@return	int
Create timestamp of a DateTime object as returned by jQuery datepicker .