webdav_client icon indicating copy to clipboard operation
webdav_client copied to clipboard

FormatException: Invalid date format

Open cwj214228 opened this issue 1 year ago • 3 comments

Unhandled exception: FormatException: Invalid date format Tue, 08 Oct 2024 14:45:01 GMT #0 DateTime.parse (dart:core/date_time.dart:351:7) #1 WebdavXml.toFiles. (package:webdav_client/src/xml.dart:87:28) #2 List.forEach (dart:core-patch/growable_array.dart:417:8) #3 WebdavXml.toFiles (package:webdav_client/src/xml.dart:36:10) #4 Client.readProps (package:webdav_client/src/client.dart:82:22)

cwj214228 avatar Oct 08 '24 14:10 cwj214228

DateTime.parse("Tue, 08 Oct 2024 14:45:01 GMT");

cwj214228 avatar Oct 08 '24 14:10 cwj214228

            // create time
            final cTimeElements = findElements(prop, 'creationdate');
            DateTime? cTime = cTimeElements.isNotEmpty
                ? str2LocalTime(cTimeElements.single.text)
                : null;

cwj214228 avatar Oct 08 '24 16:10 cwj214228

where is the core/date_time.dart and where to write this code:[[final cTimeElements = findElements(prop, 'creationdate'); DateTime? cTime = cTimeElements.isNotEmpty ? str2LocalTime(cTimeElements.single.text) : null; ]]?

2265290305 avatar Oct 10 '24 08:10 2265290305