Changeset 5668
- Timestamp:
- 10/09/08 12:43:21 (6 weeks ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/ProtocolEditor/src/util/DefaultExport.java
r5665 r5668 34 34 import java.text.SimpleDateFormat; 35 35 import java.util.ArrayList; 36 import java.util.Calendar; 37 import java.util.GregorianCalendar; 36 38 import java.util.HashMap; 37 39 import java.util.Iterator; … … 301 303 String UTCmillisecs = dataField.getAttribute(DataFieldConstants.UTC_MILLISECS); 302 304 if (UTCmillisecs != null) { 303 SimpleDateFormat sdf = new SimpleDateFormat("MMM d, yyyy"); 304 date = date + sdf.format(new Long(UTCmillisecs)); 305 Calendar cal = new GregorianCalendar(); 306 cal.setTimeInMillis(new Long(UTCmillisecs)); 307 if (cal.get(Calendar.YEAR) == 1970) { 308 int days = cal.get(Calendar.DAY_OF_MONTH) - 1; // 1st of month is 0 days 309 date = date + days + " Days."; 310 } else { 311 SimpleDateFormat sdf = new SimpleDateFormat("MMM d, yyyy"); 312 date = date + sdf.format(cal.getTimeInMillis()); 313 } 305 314 } else { 306 315 date = date + "none set.";
