public static function type_time_encode(\Fuel\Core\Date $var, array $settings)
	{
		if ( ! $var instanceof \Fuel\Core\Date)
		{
			throw new InvalidContentType('Value must be an instance of the Date class.');
		}

		if ($settings['data_type'] == 'time_mysql')
		{
			return $var->format('mysql');
		}

		return $var->get_timestamp();
	}
public static function type_time_encode(\Fuel\Core\Date $var, array $settings)
	{
		if ( ! $var instanceof \Fuel\Core\Date)
		{
			throw new InvalidContentType('Value must be an instance of the Date class.');
		}

		if ($settings['data_type'] == 'time_mysql')
		{
			return $var->format('mysql');
		}

		return $var->get_timestamp();
	}
public static function type_time_encode ( \ Fuel \ Core \ Date $ var , array $ settings ) { if ( ! $ var instanceof \ Fuel \ Core \ Date ) { throw new InvalidContentType ( 'Value must be an instance of the Date class.' ) ; } if ( $ settings [ 'data_type' ] == 'time_mysql' ) { return $ var -> format ( 'mysql' ) ; } return $ var -> get_timestamp ( ) ; }
Takes a Date instance and transforms it into a DB timestamp

@param   \Fuel\Core\Date  value
@param   array  any options to be passed

@throws  InvalidContentType

@return  int|string
Takes a Date instance and transforms it into a DB timestamp