Weirdly enough, some timezones have fractional offsets from UTC. Kabul,
specifically, is UTC/GMT +4:30 hours, which makes it impossible to correct for
the browser's offset. (The dataset I'm using only makes sense in the context of
the timezone in which it was collected)
Impl should look like this:
@Export
public void setTimeZoneOffsetMinutes(int offsetMinutes) {
if ((offsetMinutes >= -(12*60) && offsetMinutes < 0) || (offsetMinutes > 0 && offsetMinutes <= (13*60))) {
ChronoDate.isTimeZoneOffset = true;
ChronoDate.setTimeZoneOffsetInMilliseconds(offsetMinutes*60*1000);
} else { // == 0
ChronoDate.isTimeZoneOffset = false;
ChronoDate.setTimeZoneOffsetInMilliseconds(0);
}
topPanel.getCompositePanel().draw();
bottomPanel.draw();
}
@Export
public void setTimeZoneOffset(int offsetHours) {
setTimeZoneOffsetMinutes(offsetHours*60);
}
Original issue reported on code.google.com by alex@bedatadriven.com on 4 Jan 2011 at 12:19
Original issue reported on code.google.com by
alex@bedatadriven.com
on 4 Jan 2011 at 12:19