Announcement

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

    Timezone regression in the past week

    Somewhere between 6-6 and 6-14 something changed with the Date parsing on a TimeItem.

    My client code uses UTC and no DST.

    Code:
     
     DateUtil.setDefaultDisplayTimezone("+0:00");
     DateUtil.setAdjustForDST(false);
    and I also set

    Code:
    	public static final TimeZone UTC_tz = TimeZone.createTimeZone(0);
    
    	public static String formatTime(Date date) {
    		if (date == null)
    			return null;
    		String string = format.format(date, UTC_tz);
    		return string;
    	}
    
    
    	public static final CellFormatter timeCellFormatter = new CellFormatter() {
    		@Override
    		public String format(Object value, ListGridRecord record, int rowNum,
    				int colNum) {
    			return DateUtils.formatTime((Date) value);
    		}
    	};
    
    
    ...
    
     
    
    	timeField.setCellFormatter(timeFormatter);
    I reverted to 6-6 and my code works again. It may well be you fixed a bug (that I was already compensating for).

    When I have more time, I'll write a test case.
Working...
X