From 5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f Mon Sep 17 00:00:00 2001 From: KHobbits Date: Wed, 10 Aug 2011 10:41:03 +0600 Subject: [PATCH] Fixing display timezone if the server isn't running GMT+1 --- .../src/com/earth2me/essentials/DescParseTickFormat.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java index 1c8764149..21ca8feff 100755 --- a/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java +++ b/Essentials/src/com/earth2me/essentials/DescParseTickFormat.java @@ -31,6 +31,8 @@ public final class DescParseTickFormat static { + SDFTwentyFour.setTimeZone(TimeZone.getTimeZone("GMT")); + SDFTwelve.setTimeZone(TimeZone.getTimeZone("GMT")); nameToTicks.put("sunrise", 23000); nameToTicks.put("rise", 23000); @@ -196,7 +198,7 @@ public final class DescParseTickFormat public static long hoursMinutesToTicks(final int hours, final int minutes) { long ret = ticksAtMidnight; - ret += (hours - 1) * ticksPerHour; + ret += (hours) * ticksPerHour; ret += (minutes / 60.0) * ticksPerHour;