classes/Events/API/Util.php
public static function getTime($ts = 'now', $format = 'U', $tz = null) {
		if (!Util::isValidTimezone($tz)) {
			$tz = Util::getClientTimezone();
		}
		
		$dt = new DateTime(null, new DateTimeZone($tz));
		(is_int($ts)) ? $dt->setTimestamp($ts) : $dt->modify($ts);

		$time = $dt->format('H') * self::SECONDS_IN_AN_HOUR;
		$time += $dt->format('i') * self::SECONDS_IN_A_MINUTE;
		$time += $dt->format('s');

		return $dt->setTimestamp($time)->format($format);
	}
public static function getTime($ts = 'now', $format = 'U', $tz = null) {
		if (!Util::isValidTimezone($tz)) {
			$tz = Util::getClientTimezone();
		}
		
		$dt = new DateTime(null, new DateTimeZone($tz));
		(is_int($ts)) ? $dt->setTimestamp($ts) : $dt->modify($ts);

		$time = $dt->format('H') * self::SECONDS_IN_AN_HOUR;
		$time += $dt->format('i') * self::SECONDS_IN_A_MINUTE;
		$time += $dt->format('s');

		return $dt->setTimestamp($time)->format($format);
	}
public static function getTime ( $ ts = 'now' , $ format = 'U' , $ tz = null ) { if ( ! Util :: isValidTimezone ( $ tz ) ) { $ tz = Util :: getClientTimezone ( ) ; } $ dt = new DateTime ( null , new DateTimeZone ( $ tz ) ) ; ( is_int ( $ ts ) ) ? $ dt -> setTimestamp ( $ ts ) : $ dt -> modify ( $ ts ) ; $ time = $ dt -> format ( 'H' ) * self :: SECONDS_IN_AN_HOUR ; $ time += $ dt -> format ( 'i' ) * self :: SECONDS_IN_A_MINUTE ; $ time += $ dt -> format ( 's' ) ; return $ dt -> setTimestamp ( $ time ) -> format ( $ format ) ; }
Extracts time of the day timestamp

@param mixed $ts Date/time value
@param string $format Format of the return value
@return string
Extracts time of the day timestamp