Thanks, Alina! I've coded a workaround that parses the date, at least according to the formats that I've encountered on a few different android and ios devices. It's probably not robust enough for a pull request, but if anyone else has been dealing with this problem, I'm happy to explain what I did (edits are mainly in https://github.com/legiongis/arches/blob/stable/5.0.x-fpan-dateparse/arches/app/datatypes/datatypes.py and https://github.com/legiongis/arches/blob/stable/5.0.x-fpan-dateparse/arches/app/models/mobile_survey.py )
Angela On Friday, April 3, 2020 at 9:05:14 PM UTC-4, Alina Myklebust wrote: > > Hi Angela, > > I also experienced a similar issue with syncing dates using the Collector > app in version 4.4.3. If I recall correctly, the issue was logged in > Github. > > I'll check with the app developers to see if there is an update. > > Best, > > Alina > > > > On Wednesday, April 1, 2020 at 1:55:40 PM UTC-7, Angela Labrador wrote: >> >> Hi everyone, >> >> I'm running into a problem syncing a date using the Collector app in >> Arches 5 (and previously in 4). I'm getting the following error: >> >> arches.app.models.tile.TileValidationError: '2020-04-02T00:00:00.000-04:00 >> None is not in the correct format, make sure it is in this format: >> %Y-%m-%d or set the date format in >> settings.DATE_IMPORT_EXPORT_FORMAT. This data was not imported.' >> >> >> and so I added in my settings_local.py file: >> DATE_IMPORT_EXPORT_FORMAT = ['%Y-%m-%dT%H:%M:%S.%fZ', >> '%Y-%m-%dT%H:%M:%S.%f%z >> %Z', '%Y-%m-%dT%H:%M:%S.%f%z', '%Y-%m-%dT%H:%M:%S.%-f%z %Z'] >> >> >> However, none of these match the format string (I'm most unsure of the >> last portion with the milliseconds and time zone). >> >> Back in the Arches' project resource model, the node is datatype = date, >> and the card widget is using date format ISO 6801 YYYY-MM-DD. No project >> overrides on any of these. In the collector app, I get the standard pop up >> calendar and can choose a date (no time). >> >> Grateful for ideas. Thanks, >> Angela >> > -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/archesproject/70553905-be0b-4557-be0c-c7bd0c964774o%40googlegroups.com.
