-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change timestamps to UTC timezone (per Riot fix)
- Loading branch information
Rob Rua
committed
Jul 18, 2014
1 parent
ad503a9
commit ff62d4e
Showing
1 changed file
with
1 addition
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
package lib.orianna.api; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.ZoneId; | ||
import java.time.ZoneOffset; | ||
import java.time.ZonedDateTime; | ||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.Comparator; | ||
|
@@ -74,9 +72,6 @@ | |
* @author Rob Rua (FatalElement - NA) ([email protected]) | ||
*/ | ||
public class JSONConverter { | ||
// It scares me that this is the best way to get a local offset right now... | ||
private static final ZoneOffset timeZone = ZoneOffset.from(ZonedDateTime.now(ZoneId.systemDefault())); | ||
|
||
private static Integer convertInteger(final Object object) { | ||
final Long longVersion = (Long)object; | ||
if(longVersion == null) { | ||
|
@@ -90,7 +85,7 @@ private static LocalDateTime getDateTime(final JSONObject object, final String k | |
if(epoch == null) { | ||
return null; | ||
} | ||
return LocalDateTime.ofEpochSecond(epoch / 1000, 0, timeZone); | ||
return LocalDateTime.ofEpochSecond(epoch / 1000, 0, ZoneOffset.UTC); | ||
} | ||
|
||
private static List<Double> getDoubleList(final JSONArray list) { | ||
|