From c3b7dd4c323ddeea719bf2e4a04ad66a8085ddc8 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sun, 10 Mar 2019 17:12:00 -0400 Subject: [PATCH] Use timezone for new Planner methods --- main/src/main/java/me/blackvein/quests/Planner.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/src/main/java/me/blackvein/quests/Planner.java b/main/src/main/java/me/blackvein/quests/Planner.java index 010a06162..7c43e480b 100644 --- a/main/src/main/java/me/blackvein/quests/Planner.java +++ b/main/src/main/java/me/blackvein/quests/Planner.java @@ -13,6 +13,7 @@ package me.blackvein.quests; import java.util.Calendar; +import java.util.TimeZone; public class Planner { public String start = null; @@ -31,6 +32,8 @@ public class Planner { String[] s = start.split(":"); cal.set(Integer.valueOf(s[2]), Integer.valueOf(s[1]), Integer.valueOf(s[0]), Integer.valueOf(s[3]), Integer.valueOf(s[4]), Integer.valueOf(s[5])); + TimeZone tz = TimeZone.getTimeZone(s[6]); + cal.setTimeZone(tz); return cal.getTimeInMillis(); } public boolean hasStart() { @@ -50,6 +53,8 @@ public class Planner { String[] s = end.split(":"); cal.set(Integer.valueOf(s[2]), Integer.valueOf(s[1]), Integer.valueOf(s[0]), Integer.valueOf(s[3]), Integer.valueOf(s[4]), Integer.valueOf(s[5])); + TimeZone tz = TimeZone.getTimeZone(s[6]); + cal.setTimeZone(tz); return cal.getTimeInMillis(); } public boolean hasEnd() {