diff --git a/src/features/form/sagas.js b/src/features/form/sagas.js index 4ae6f45..7644316 100644 --- a/src/features/form/sagas.js +++ b/src/features/form/sagas.js @@ -77,7 +77,7 @@ function createObs(val, path, concept, formId, orderUuid, existingObsFlattened) // If the value is a date, re-format so it is compatible with date (yyyy-MM-dd) and datetime (yyyy-MM-dd HH:mm) formats expected by REST module // Really this seems like something that should be fixed in the REST module, but doing it here to keep changes contained // We don't have any access to concept metadata at this point, and so we are just hacking in an array of DATETIME_CONCEPTS that should use this handling - const dateTimeRegex = new RegExp("^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}-[0-9]{2}:[0-9]{2})$"); + const dateTimeRegex = new RegExp("^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}[-,+][0-9]{2}:[0-9]{2})$"); if (dateTimeRegex.test(val)) { if (DATETIME_CONCEPTS.indexOf(concept) !== -1) { val = val.substring(0, 16).replace("T", " ");