.. | .. |
---|
13 | 13 | public static final TimeUnit HOUR = new TimeUnit("Hours", Calendar.HOUR_OF_DAY, 60 * 60 * 1000L, "HH:mm", "MMM d yyyy HH:mm"); |
---|
14 | 14 | public static final TimeUnit MINUTE = new TimeUnit("Minutes", Calendar.MINUTE, 60 * 1000L, ":mm", "MMM d yyyy HH:mm"); |
---|
15 | 15 | public static final TimeUnit SECOND = new TimeUnit("Seconds", Calendar.SECOND, 1000L, ":ss", "MMM d yyyy HH:mm:ss"); |
---|
16 | | - public static final TimeUnit REALTIME = new TimeUnit("Realtime", Calendar.MILLISECOND, 8L, ":SSS", "MMM d yyyy HH:mm:ss:SSS"); |
---|
| 16 | + public static final TimeUnit REALTIME = new TimeUnit("Realtime", Calendar.MILLISECOND, 1L, ":SS", "HH:mm:ss.SS"); |
---|
17 | 17 | |
---|
18 | 18 | public static final TimeUnit DECADE = multipleYears(10); |
---|
19 | 19 | public static final TimeUnit CENTURY = multipleYears(100); |
---|
.. | .. |
---|
101 | 101 | } |
---|
102 | 102 | private static final int[] calendarUnits = |
---|
103 | 103 | { |
---|
104 | | - Calendar.SECOND, Calendar.MINUTE, Calendar.HOUR_OF_DAY, Calendar.DAY_OF_MONTH, Calendar.MONTH, Calendar.YEAR |
---|
| 104 | + Calendar.MILLISECOND, Calendar.SECOND, Calendar.MINUTE, Calendar.HOUR_OF_DAY, Calendar.DAY_OF_MONTH, Calendar.MONTH, Calendar.YEAR |
---|
105 | 105 | }; |
---|
106 | 106 | |
---|
107 | 107 | public RoughTime round(long timestamp, boolean up) |
---|
.. | .. |
---|
128 | 128 | } |
---|
129 | 129 | if (i == calendarUnits.length - 1) |
---|
130 | 130 | { |
---|
131 | | - throw new IllegalArgumentException("Unsupported Calendar Unit: " + calendarCode); |
---|
| 131 | + //throw new IllegalArgumentException("Unsupported Calendar Unit: " + calendarCode); |
---|
132 | 132 | } |
---|
133 | 133 | c.set(calendarUnits[i], c.getMinimum(calendarUnits[i])); |
---|
134 | 134 | } |
---|