Beispiel #1
0
 static {
   String pattern = "EEE, dd MMM yyyy HH:mm:ss zzz";
   tz = TimeZone.getTimeZone("GMT");
   df = new SimpleDateFormat(pattern, Locale.US);
   df.setTimeZone(tz);
 }
Beispiel #2
0
 /**
  * Converts windows time in minutes from 1/1/1601 to <tt>Date</tt> object.
  *
  * @param time the number of minutes from 1/1/1601
  * @return the <tt>Date</tt> object
  */
 public static Date windowsTimeToDateObject(long time) {
   // Date.parse("1/1/1601") == 11644473600000L
   long date = time * 60000 - 11644473600000L;
   date -= TimeZone.getDefault().getOffset(date);
   return new Date(date);
 }