diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-10-28 19:15:59 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-10-28 19:15:59 +0300 |
commit | 427475fac1cc9e7c0450258c40476495ac340bb4 (patch) | |
tree | a1cbd9c4a0fbf6455a4a42c6723a1db1d86188ac /app/src/main/java/it/niedermann/nextcloud/deck/api | |
parent | 14cc414704fba83c9570d448b8d0f38c184a17ad (diff) |
Java 8 core library desugaring
- Remove com.jakewharton.threetenabp dependency
- Enable core library desugaring
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/api')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java b/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java index c552a7f9e..6a8fcb873 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/api/JsonToEntityParser.java @@ -6,10 +6,8 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import org.threeten.bp.DateTimeUtils; -import org.threeten.bp.ZonedDateTime; -import org.threeten.bp.format.DateTimeFormatter; - +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -650,7 +648,7 @@ public class JsonToEntityParser { return null; } else { String dateAsString = jsonElement.getAsString(); - return DateTimeUtils.toDate(ZonedDateTime.from(DateTimeFormatter.ISO_DATE_TIME.parse(dateAsString)).toInstant()); + return new Date(ZonedDateTime.from(DateTimeFormatter.ISO_DATE_TIME.parse(dateAsString)).toInstant().toEpochMilli()); } } |