marcomachadosantos / gwt-chronoscope

Automatically exported from code.google.com/p/gwt-chronoscope
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Plot API does not support timezone offsets of fractional offsets #158

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Bizpoint has submitted a fix for review upstream.

Original comment by huangron...@gmail.com on 12 Jan 2011 at 3:08