From ed7fa1fcb8c077f14b42df86ecf7c4674114a73b Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 22 Jun 2021 14:24:08 +0800 Subject: [PATCH] fix: better date parsing for epub metadata --- .../infrastructure/metadata/epub/EpubMetadataProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt index 138e7a588..bdbabb6a8 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt @@ -121,7 +121,11 @@ class EpubMetadataProvider( try { LocalDate.parse(date, DateTimeFormatter.ISO_LOCAL_DATE) } catch (e: Exception) { - null + try { + LocalDate.parse(date, DateTimeFormatter.ISO_DATE_TIME) + } catch (e: Exception) { + null + } } } }