use setTimeinMillis - we require 1.4 so we don't need to worry that it was protected on 1.3 anymore

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@778795 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2009-05-26 16:50:32 +00:00
parent 62ab47f7fd
commit 370a3f4580
1 changed files with 1 additions and 4 deletions

View File

@ -88,10 +88,7 @@ public class DateTools {
public static String timeToString(long time, Resolution resolution) {
Calendar cal = Calendar.getInstance(GMT);
//protected in JDK's prior to 1.4
//cal.setTimeInMillis(round(time, resolution));
cal.setTime(new Date(round(time, resolution)));
cal.setTimeInMillis(round(time, resolution));
String result;
if (resolution == Resolution.YEAR) {