Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug? Calendar + UTC times

    === 2011-04-18 14:32:18,848 [main] INFO ISCInit - Isomorphic SmartClient Framework (SC_SNAPSHOT-2011-04-11/EVAL Deployment 2011-04-11) - Initialization Complete

    Using Ubuntu 10.04 and Firefox 3.6.

    Calendar is inconsistent in how it respects the DateUtil definitions.

    Code:
    		DateUtil.setAdjustForDST(false);
    		DateUtil.setDefaultDisplayTimezone("+0:00");
    
    		Calendar calendar = new Calendar();
    		Date now = new Date(System.currentTimeMillis());
    		long hour = 1000L * 60L * 60L;
    		Date oneHourLater = new Date(System.currentTimeMillis() + hour);
    		calendar.addEvent(now, oneHourLater, "An event", "");
    The following screen shot shows this code being run. The event correctly displays the UTC time but the calendar time (on the left) is in local time (PST).
    Attached Files
Working...
X