summaryrefslogtreecommitdiffstats
path: root/Essentials
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-08-10 10:41:03 +0600
committerKHobbits <rob@khobbits.co.uk>2011-08-10 10:41:03 +0600
commit5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f (patch)
treeda292350bed82c4ba7f525d64664247f00586cfd /Essentials
parentabbeb0a2129b793715e944f256ff92761a855d1a (diff)
downloadEssentials-5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f.tar
Essentials-5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f.tar.gz
Essentials-5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f.tar.lz
Essentials-5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f.tar.xz
Essentials-5bb86309f624efc2c7f4b1d8cb18e168f1e4dd3f.zip
Fixing display timezone if the server isn't running GMT+1
Diffstat (limited to 'Essentials')
-rwxr-xr-xEssentials/src/com/earth2me/essentials/DescParseTickFormat.java4
1 files changed, 3 insertions, 1 deletions
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;