private function getFormattedTime(SwatDate $time)
    {
        $format = '';

        if ($this->display_parts & self::HOUR) {
            $format .= $this->twelve_hour ? 'h' : 'H';
            if ($this->display_parts & (self::MINUTE | self::SECOND)) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::MINUTE) {
            $format .= 'mm';
            if ($this->display_parts & self::SECOND) {
                $format .= ':';
            }
        }

        if ($this->display_parts & self::SECOND) {
            $format .= 'ss';
        }

        if ($this->display_parts & self::HOUR && $this->twelve_hour) {
            $format .= ' a';
        }

        return $time->formatLikeIntl($format);
    }