From e22eaa1481caeaec57094e9c5c9e071fbd678fb8 Mon Sep 17 00:00:00 2001 From: Herbert Poul Date: Mon, 14 Sep 2020 15:56:51 +0200 Subject: [PATCH] date parsing: treat empty string as null, but output warning. --- lib/src/kdbx_xml.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/kdbx_xml.dart b/lib/src/kdbx_xml.dart index 80f3dcf..bcee3f5 100644 --- a/lib/src/kdbx_xml.dart +++ b/lib/src/kdbx_xml.dart @@ -254,6 +254,10 @@ class DateTimeUtcNode extends KdbxSubTextNode { if (value == null) { return null; } + if (value.isEmpty) { + _logger.warning('time contains empty string. $name'); + return null; + } try { if (value.contains(':')) { return DateTime.parse(value);