1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Use a different DateTimeFormat on legacy android versions (<24)

Fixes #1055
This commit is contained in:
Daniele Gobbetti 2018-04-12 21:47:40 +02:00
parent 141d01a200
commit e7c10f3f01

View File

@ -40,6 +40,9 @@ public class DateTimeUtils {
}
public static String formatIso8601(Date date) {
if(!GBApplication.isRunningNougatOrLater()){
return new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZZZ", Locale.US).format(date);
}
return ISO_8601_FORMAT.format(date);
}