Changeset 417
- Timestamp:
- 11/20/08 15:32:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/io/Logger.java
r362 r417 37 37 38 38 public static final String LONG_DATE_FORMAT = "ddMMMyyyy[HH:mm]"; 39 39 40 40 public static final String SYSTEM = "S"; 41 41 … … 159 159 return (new SimpleDateFormat(format)).format(date); 160 160 } 161 161 162 162 public static String EasyTimeFormat(Time time) { 163 return (new SimpleDateFormat("KK:mm:ss")).format(time); 163 /* 164 * Truncate the millis 165 */ 166 long total = time.getTime() / 1000; 167 long seconds = total % 60; 168 // Truncate the secs 169 total /= 60; 170 long minutes = total % 60; 171 // Truncate the minutes 172 long hours = total / 60; 173 174 return String.format("%1$02d:%2$02d:%3$02d", hours, minutes, seconds); 164 175 } 165 176
Note:
See TracChangeset
for help on using the changeset viewer.