From ca0b9017d95329446d00f161d1f82c4709cb439c Mon Sep 17 00:00:00 2001 From: y20k Date: Mon, 29 Jan 2018 10:35:44 +0100 Subject: [PATCH] assign UTC to GPX time stamps (see #31) --- .../main/java/org/y20k/trackbook/helpers/ExportHelper.java | 2 ++ build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/y20k/trackbook/helpers/ExportHelper.java b/app/src/main/java/org/y20k/trackbook/helpers/ExportHelper.java index a73034a..87daee8 100644 --- a/app/src/main/java/org/y20k/trackbook/helpers/ExportHelper.java +++ b/app/src/main/java/org/y20k/trackbook/helpers/ExportHelper.java @@ -33,6 +33,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; +import java.util.TimeZone; /** * ExportHelper class @@ -136,6 +137,7 @@ public class ExportHelper implements TrackbookKeys { private String addTrack(Track track) { StringBuilder gpxTrack = new StringBuilder(""); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); // add opening track tag gpxTrack.append("\t\n"); diff --git a/build.gradle b/build.gradle index 8bd05ac..f39f109 100644 --- a/build.gradle +++ b/build.gradle @@ -20,8 +20,8 @@ allprojects { } project.ext { applicationId = 'org.y20k.trackbook' - versionCode = 19 - versionName = '1.1.3' + versionCode = 20 + versionName = '1.1.4' minSdkVersion = 22 compileSdkVersion = 27 targetSdkVersion = 27