aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-06-04 18:17:18 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-06-04 18:17:18 +0200
commitacc402b3876d7022d19ff409caaa545ddb6e0f32 (patch)
tree4e23fdf4019e558dbafff022102d47a0b17252e2 /main/src/cgeo/geocaching/connector
parentd6046fba9b63fa2ef5a6d1b86a88cbefbdfaf76a (diff)
downloadcgeo-acc402b3876d7022d19ff409caaa545ddb6e0f32.zip
cgeo-acc402b3876d7022d19ff409caaa545ddb6e0f32.tar.gz
cgeo-acc402b3876d7022d19ff409caaa545ddb6e0f32.tar.bz2
#2833: fix log date format
Diffstat (limited to 'main/src/cgeo/geocaching/connector')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index b2705b2..1c8e288 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -967,12 +967,13 @@ public abstract class GCParser {
+ "; date: " + year + "." + month + "." + day + ", log: " + logInfo
+ "; trackables: " + (trackables != null ? trackables.size() : "0"));
+ final String dateString = String.format("%04d", year) + "-" + String.format("%02d", month) + "-" + String.format("%02d", day);
final Parameters params = new Parameters(
"__EVENTTARGET", "",
"__EVENTARGUMENT", "",
"__LASTFOCUS", "",
"ctl00$ContentBody$LogBookPanel1$ddLogType", Integer.toString(logType.id),
- "ctl00$ContentBody$LogBookPanel1$uxDateVisited", String.format("%02d", month) + "/" + String.format("%02d", day) + "/" + String.format("%04d", year),
+ "ctl00$ContentBody$LogBookPanel1$uxDateVisited", dateString,
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Month", Integer.toString(month),
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Day", Integer.toString(day),
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Year", Integer.toString(year),
@@ -1168,7 +1169,8 @@ public abstract class GCParser {
params.put("ctl00$ContentBody$LogBookPanel1$uxDateVisited", "");
} else {
params.put("ctl00$ContentBody$LogBookPanel1$DateTimeLogged", Integer.toString(month) + "/" + Integer.toString(day) + "/" + Integer.toString(year));
- params.put("ctl00$ContentBody$LogBookPanel1$uxDateVisited", Integer.toString(month) + "/" + Integer.toString(day) + "/" + Integer.toString(year));
+ final String dateString = String.format("%04d", year) + "-" + String.format("%02d", month) + "-" + String.format("%02d", day);
+ params.put("ctl00$ContentBody$LogBookPanel1$uxDateVisited", dateString);
}
params.put(
"ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Day", Integer.toString(day),