Sample 0 [from 161 instances]

Class1100.getDateTime(Long d)#0{
        if (d != null)
            dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
        Date date = (d == nullnew Date() new Date(d);
        return dateFormat.format(date);
}


Sample 1 [from 141 instances]

Class1360.test2()#0{
      assertEquals("00:00:00,000", gmtFormat.format(jul2));
      assertEquals("19:00:00,000", chicagoFormat.format(jul2));
      assertEquals("00:00:00,000", gmtFormat.format(jul2));
}


Sample 2 [from 73 instances]

Class210.setEndTime(Date endTime){
        DateFormat endTimeFormat = new SimpleDateFormat(DATE_FORMAT_STRING);
        return setConfig(END_TIME, endTimeFormat.format(endTime));
}


Sample 3 [from 52 instances]

Class1010.testDateTimeFormat()#0{
      Calendar calendar = Calendar.getInstance();
      calendar.clear();
      calendar.set(197001000);
      String actual = format.format(calendar.getTime());
}


Sample 4 [from 28 instances]

Class320.getTimestampFormatted(){
        DateFormat formatter = DateFormat.getDateTimeInstance();
        return formatter.format(timestamp);
}


Sample 5 [from 24 instances]

Class1240.formatHeaderDate(Date date)#0{
        rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT"));
        return rfc1123Format.format(date);
}


Sample 6 [from 18 instances]

Class60.getDate(Date date,int format,Locale locale){
        DateFormat df = DateFormat.getDateInstance(format, locale);
        return df.format(date);
}


Sample 7 [from 18 instances]

Class820.getDateDisplayString(TimeZone tz,Date time,String formatString){
    DateFormat df = new Simple
}


Sample 8 [from 16 instances]

Class720.printDateTime(Date dt)#0{
    return (dt == nullnull formatter.format(dt);
}


Sample 9 [from 12 instances]

Class1220.getFormattedDate(final Object date,final String pattern,final Locale locale,final TimeZone timeZone)#1{
    if (timeZone != null) {
      format.setTimeZone(timeZone);
    }
    return format.format(date);
}


Sample 10 [from 8 instances]

Class200.testFormat_HHmmss()#2{
    Assert.assertEquals("224000", dateFormat.format(getTime()));
}


Sample 11 [from 6 instances]

Class1350.format(Object o)#2{
                o = dateFormat.format((Dateo);
}


Sample 12 [from 5 instances]

Class320.getCurrentDate()#1{
    Date now = Calendar.getInstance().getTime();
    String date = df.format(now);
}