Skip to content

Commit

Permalink
Changed utc_offset from short to int so it doesn't overflow for GMT>9
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Larsen <clarsen@euphoriaaudio.com>
  • Loading branch information
mcclymont authored and manolama committed Apr 18, 2014
1 parent 7739381 commit 1d57469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graph/Plot.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public final class Plot {
* Gnuplot always renders timestamps in UTC, so we simply apply a delta
* to get local time.
*/
private final short utc_offset;
private final int utc_offset;

/**
* Constructor.
Expand Down Expand Up @@ -113,7 +113,7 @@ public Plot(final long start_time, final long end_time, TimeZone tz) {
if (tz == null) {
tz = DEFAULT_TZ;
}
this.utc_offset = (short) (tz.getOffset(System.currentTimeMillis()) / 1000);
this.utc_offset = tz.getOffset(System.currentTimeMillis()) / 1000;
}

/**
Expand Down

0 comments on commit 1d57469

Please sign in to comment.