From df5271ef05676f68d0bf76d1d3ee4e8b392272ed Mon Sep 17 00:00:00 2001 From: "Nelson R. Perez" Date: Wed, 3 May 2017 13:20:48 -0500 Subject: [PATCH] Setting UTC as the time zone for the the deserialized time field in the dynamic global properties object --- .../graphenej/models/DynamicGlobalProperties.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/DynamicGlobalProperties.java b/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/DynamicGlobalProperties.java index d1cc36f..e27cbc0 100644 --- a/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/DynamicGlobalProperties.java +++ b/graphenej/src/main/java/de/bitsharesmunich/graphenej/models/DynamicGlobalProperties.java @@ -11,6 +11,7 @@ import java.lang.reflect.Type; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.TimeZone; import de.bitsharesmunich.graphenej.GrapheneObject; import de.bitsharesmunich.graphenej.Util; @@ -70,6 +71,7 @@ public class DynamicGlobalProperties extends GrapheneObject implements Serializa dynamicGlobal.head_block_id = jsonObject.get(DynamicGlobalProperties.KEY_HEAD_BLOCK_ID).getAsString(); SimpleDateFormat dateFormat = new SimpleDateFormat(Util.TIME_DATE_FORMAT); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); try { dynamicGlobal.time = dateFormat.parse(jsonObject.get(DynamicGlobalProperties.KEY_TIME).getAsString()); } catch (ParseException e) {