Browse Source

date parsing: treat empty string as null, but output warning.

pull/3/head
Herbert Poul 4 years ago
parent
commit
e22eaa1481
  1. 4
      lib/src/kdbx_xml.dart

4
lib/src/kdbx_xml.dart

@ -254,6 +254,10 @@ class DateTimeUtcNode extends KdbxSubTextNode<DateTime> {
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);

Loading…
Cancel
Save