assign UTC to GPX time stamps (see #31)

This commit is contained in:
y20k 2018-01-29 10:35:44 +01:00
parent f140a65354
commit ca0b9017d9
2 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Locale; import java.util.Locale;
import java.util.TimeZone;
/** /**
* ExportHelper class * ExportHelper class
@ -136,6 +137,7 @@ public class ExportHelper implements TrackbookKeys {
private String addTrack(Track track) { private String addTrack(Track track) {
StringBuilder gpxTrack = new StringBuilder(""); StringBuilder gpxTrack = new StringBuilder("");
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US); DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US);
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
// add opening track tag // add opening track tag
gpxTrack.append("\t<trk>\n"); gpxTrack.append("\t<trk>\n");

View file

@ -20,8 +20,8 @@ allprojects {
} }
project.ext { project.ext {
applicationId = 'org.y20k.trackbook' applicationId = 'org.y20k.trackbook'
versionCode = 19 versionCode = 20
versionName = '1.1.3' versionName = '1.1.4'
minSdkVersion = 22 minSdkVersion = 22
compileSdkVersion = 27 compileSdkVersion = 27
targetSdkVersion = 27 targetSdkVersion = 27