/** * Construct a date object from a Java <code>Date</code> object. * * @param date the Java <code>Date</code> object. */ public DCDate(Date date) { setUTCForFormatting(); if (date == null) { return; } // By definition a Date has a time component so always set the granularity to TIME. granularity = DateGran.TIME; // Set the local calendar. localCalendar = new GregorianCalendar(); localCalendar.setTime(date); // Now set the UTC equivalent. calendar = new GregorianCalendar(utcZone); calendar.setTime(date); }