mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-16 05:11:30 +01:00
Use timezone for new Planner methods
This commit is contained in:
parent
c566e73513
commit
c3b7dd4c32
@ -13,6 +13,7 @@
|
|||||||
package me.blackvein.quests;
|
package me.blackvein.quests;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
public class Planner {
|
public class Planner {
|
||||||
public String start = null;
|
public String start = null;
|
||||||
@ -31,6 +32,8 @@ public class Planner {
|
|||||||
String[] s = start.split(":");
|
String[] s = start.split(":");
|
||||||
cal.set(Integer.valueOf(s[2]), Integer.valueOf(s[1]), Integer.valueOf(s[0]),
|
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]));
|
Integer.valueOf(s[3]), Integer.valueOf(s[4]), Integer.valueOf(s[5]));
|
||||||
|
TimeZone tz = TimeZone.getTimeZone(s[6]);
|
||||||
|
cal.setTimeZone(tz);
|
||||||
return cal.getTimeInMillis();
|
return cal.getTimeInMillis();
|
||||||
}
|
}
|
||||||
public boolean hasStart() {
|
public boolean hasStart() {
|
||||||
@ -50,6 +53,8 @@ public class Planner {
|
|||||||
String[] s = end.split(":");
|
String[] s = end.split(":");
|
||||||
cal.set(Integer.valueOf(s[2]), Integer.valueOf(s[1]), Integer.valueOf(s[0]),
|
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]));
|
Integer.valueOf(s[3]), Integer.valueOf(s[4]), Integer.valueOf(s[5]));
|
||||||
|
TimeZone tz = TimeZone.getTimeZone(s[6]);
|
||||||
|
cal.setTimeZone(tz);
|
||||||
return cal.getTimeInMillis();
|
return cal.getTimeInMillis();
|
||||||
}
|
}
|
||||||
public boolean hasEnd() {
|
public boolean hasEnd() {
|
||||||
|
Loading…
Reference in New Issue
Block a user