mirror of https://github.com/apache/lucene.git
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:
parent
62ab47f7fd
commit
370a3f4580
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue