diff --git a/app/src/main/java/info/nightscout/utils/NSUpload.java b/app/src/main/java/info/nightscout/utils/NSUpload.java index 9f26d01fea..cc1c2b7a57 100644 --- a/app/src/main/java/info/nightscout/utils/NSUpload.java +++ b/app/src/main/java/info/nightscout/utils/NSUpload.java @@ -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();