public static function convertToDbDate(\DateTime $dateTime) {
		
		$currentTz = $dateTime->getTimezone();
		$dateTime->setTimezone(new \DateTimeZone(BASE_TIMEZONE));
		$ret = $dateTime->format('Y-m-d');
		$dateTime->setTimezone($currentTz);
		return $ret;
		
	}
public static function convertToDbDate(\DateTime $dateTime) {
		
		$currentTz = $dateTime->getTimezone();
		$dateTime->setTimezone(new \DateTimeZone(BASE_TIMEZONE));
		$ret = $dateTime->format('Y-m-d');
		$dateTime->setTimezone($currentTz);
		return $ret;
		
	}
public static function convertToDbDate ( \ DateTime $ dateTime ) { $ currentTz = $ dateTime -> getTimezone ( ) ; $ dateTime -> setTimezone ( new \ DateTimeZone ( BASE_TIMEZONE ) ) ; $ ret = $ dateTime -> format ( 'Y-m-d' ) ; $ dateTime -> setTimezone ( $ currentTz ) ; return $ ret ; }
Converts a DateTime object to date field type for db query. In case of UTC_DATE parameter on,
date will be temporary converted to UTC.

@param	DateTime	Object to convert.

@return	string
Converts a DateTime object to date field type for db query . In case of UTC_DATE parameter on date will be temporary converted to UTC .