Project Name (if applicable, otherwise just type n/a)
Conteo Herpetos Chile 2026
Question
Bulk uploading entries with a TIME question fails with “Date/time format incorrect” (ec5_79) every Sunday (UTC), and works on any other day without changing the file. I think I found the cause in the source code.
In epicollect5-dataviewer, app/utils/reverse-entry-parser.js (case EC5_TIME_TYPE), the date part of the time answer is built with:
const day = ('0' + today.getUTCDay()).slice(-2);
getUTCDay() returns the day of the WEEK (0–6), not the day of the month. On Sundays it returns 0, so the answer becomes e.g. “2026-10-00T20:26:00.000”. The server rule in RuleTimeInput uses Laravel’s “date” validation, and checkdate(10, 0, 2026) is false, so every row fails with ec5_79.
On Monday–Saturday it silently stores a date between 01 and 06 (e.g. “2026-10-02T22:00:00.000” for an upload on Tuesday 20 Oct), which is why the error seems to “go away by itself”.
Suggested fix: use getUTCDate() instead of getUTCDay().
Steps to reproduce:
- Form with a TIME question (format HH:mm), bulk uploads enabled.
- Upload a CSV with a valid time (e.g. 20:26) on a Sunday (UTC) → “Date/time format incorrect”.
- Upload the same unchanged file on any other day → success.
This matches earlier reports, which were all made on Sundays:
Thanks for the great platform!
I confirm I have read the User Guide at docs.epicollect.net
on
I confirm I have searched for an answer in this community.
on
I confirm I have tried asking the same question to Perplexity AI with the tag #epicollect5, but it did not help.
on