Returns the given time parsed using "HH:mm:ss".
@param dt The time to be parsed
@param format The format to use when parsing the date
@param isTime <CODE>true</CODE> if the given time has a timezone
@return The given time parsed using "HH:mm:ss"
778944
static public String getFormattedTime(long dt, String format, boolean isTime)
    {
        String ret = "";
        SimpleDateFormat df = null;

        try
        {
            if(dt > 0)
            {
                df = formatPool.getFormat(format);
                if(isTime)
                    df.setTimeZone(DateUtilities.getCurrentTimeZone());
                else
                    df.setTimeZone(DateUtilities.defaultTZ);
                ret = df.format(new Date(dt));
            }
        }
        catch(Exception e)
        {
        }

        if(df != null)
            formatPool.release(df);

        return ret;
    }
202741
public LambdaDslJsonArray time(final String format, final Date example) {
        pactArray.time(format, example);
        return this;
    }
284686
public static String getDateString(String format, Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
9213
public static Time parseTime(final String date, final String format, final TimeZone timeZone) {
        if (N.isNullOrEmpty(date) || (date.length() == 4 && "null".equalsIgnoreCase(date))) {
            return null;
        }

        return createTime(parse(date, format, timeZone));
    }
343655
public static function format($time = null, $format = 'Y-m-d H:i:s') {
		if (!empty($time) && !is_numeric($time)) {
			$format = $time;
			$time = time();
		}
		if (is_null($time)) {
			$time = time();
		}
		return date($format, $time);
	}
1130718
public static DateTime toDateTime(long input, String format, String timezone) {
    return toDateTime(Long.toString(input), format, timezone);
  }
1215930
static public String getSFTimeAsString(
      SFTime sft, int scale, SnowflakeDateTimeFormat timeFormatter)
  {
    return timeFormatter.format(sft, scale);
  }
1163318
public static Date convertTimeToDate(Date time)
    {
        if (time != null)
        {
            DataConverters.initGlobals();
            Calendar calendar = DataConverters.gCalendar;
            calendar.setTime(time);
            calendar.set(Calendar.HOUR_OF_DAY, 0);
            calendar.set(Calendar.MINUTE, 0);
            calendar.set(Calendar.SECOND, 0);
            calendar.set(Calendar.MILLISECOND, 0);
            time = calendar.getTime();
        }       
        return time;
    }
1329322
public static String format( DateTimeFormat format, Date date ) {
        return format( format, UTC_TIMEZONE, date );
    }
905167
public function getDateTimeFormat(string $format='Y-m-d H:i:s')
    {
        $this->setDateTimeZone()->setDateTime();

        return $this->dateTime->format($format);
    }
842673
public static Date parseRunningTime(final String pTime) throws ParseException {

        int time = 0;
        Matcher m = Pattern.compile("(\\d+)d").matcher(pTime);
        if (m.find()) {
            time += Integer.parseInt(m.group(1)) * DAY;
        }
        m = Pattern.compile("(\\d+)h").matcher(pTime);
        if (m.find()) {
            time += Integer.parseInt(m.group(1)) * HOUR;
        }
        m = Pattern.compile("(\\d+)m").matcher(pTime);
        if (m.find()) {
            time += Integer.parseInt(m.group(1)) * MINUTE;
        }
        m = Pattern.compile("(\\d+)s").matcher(pTime);
        if (m.find()) {
            time += Integer.parseInt(m.group(1)) * SECOND;
        }

        return new Date(time);
    }
479630
public static Calendar parse(final String date, final String format) {
		return parse(date, DateTimeFormat.forPattern(format));
	}
618103
def load_datetime(value, dt_format):
    
    if dt_format.endswith('%z'):
        dt_format = dt_format[:-2]
        offset = value[-5:]
        value = value[:-5]
        if offset != offset.replace(':', ''):
            # strip : from HHMM if needed (isoformat() adds it between HH and MM)
            offset = '+' + offset.replace(':', '')
            value = value[:-1]
        return OffsetTime(offset).localize(datetime.strptime(value, dt_format))

    return datetime.strptime(value, dt_format)
1330575
public static String getTime(Date date, Format format) {

        DateTimeFormat df;
        switch (format) {
            case FULL:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.TIME_FULL);
                break;
            case LONG:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.TIME_LONG);
                break;
            case MEDIUM:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.TIME_MEDIUM);
                break;
            case SHORT:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.TIME_SHORT);
                break;
            default:
                // can never happen, just to prevent stupid warning
                return "";
        }
        return df.format(date);
    }
617674
public String format(Time pTime) {
	StringBuilder buf = new StringBuilder();
	for (int i = 0; i < formatter.length; i++) {
	    buf.append(formatter[i].format(pTime));
	}
	return buf.toString();
    }
453141
public static Calendar parse(final String date, final DateTimeFormatter format) {
		return format.parseDateTime(date).toGregorianCalendar();
	}
1086368
public static DateTime toDateTime(String input, String format, String timezone) {
    String tz = StringUtils.defaultString(timezone, ConfigurationKeys.DEFAULT_SOURCE_TIMEZONE);
    DateTimeZone dateTimeZone = getTimeZone(tz);
    DateTimeFormatter inputDtFormat = DateTimeFormat.forPattern(format).withZone(dateTimeZone);
    DateTime outputDateTime = inputDtFormat.parseDateTime(input).withZone(dateTimeZone);
    return outputDateTime;
  }