Unbreak NSUpload.updateProfileSwitch methods.

This commit is contained in:
Johannes Mockenhaupt 2018-03-24 20:03:45 +01:00
parent a4e9cb4976
commit 5a6af7f6d5
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -310,7 +310,7 @@ public class NSUpload {
data.put("timeshift", profileSwitch.timeshift);
data.put("percentage", profileSwitch.percentage);
}
data.put("created_at", getNextAvailableSecond(profileSwitch.date));
data.put("created_at", DateUtil.toISOString(profileSwitch.date));
data.put("enteredBy", MainApp.instance().getString(R.string.app_name));
if (profileSwitch._id != null) {
Context context = MainApp.instance().getApplicationContext();
@ -337,7 +337,7 @@ public class NSUpload {
if (data.has("notes")) prebolus.put("notes", data.get("notes"));
long mills = DateUtil.fromISODateString(data.getString("created_at")).getTime();
Date preBolusDate = new Date(mills + data.getInt("preBolus") * 60000L + 1000L);
prebolus.put("created_at", getNextAvailableSecond(preBolusDate.getTime()));
prebolus.put("created_at", DateUtil.toISOString(preBolusDate.getTime()));
uploadCareportalEntryToNS(prebolus);
}
Context context = MainApp.instance().getApplicationContext();