When executing the PR #634 on production we noticed that this string 2017-02-04 21:05:15 +0000 was not recognized as a valid string.
Error Example
osm_id: 21302157
EXIF date_time format '2017-02-04 21:05:15 +0000' is not supported: no implicit conversion of Time into String
Even though this was fixed by using to_s on date_time, we decided to refactor the current validation to be on the safe side for the future. Luckily the DateTime parser would parse most of the date_time formats we need for now.
Allowed date_time formats:
"2017/07/10 5:21:29 AM"
"2017/07/10 5:21:29 pm"
"2017/07/10 5:21:29 p.m."
"2017-07-10 5:21:29 a.m."
"2017/07/10 5:21:29 P.M."
"2017-07-10 5:21:29 +2000"
"2017-07-10 05:21:29 -2000"
This is a follow-up PR of PR #634 and part of Github issue #633.
When executing the PR #634 on production we noticed that this string
2017-02-04 21:05:15 +0000
was not recognized as a valid string.Error Example
Even though this was fixed by using
to_s
on date_time, we decided to refactor the current validation to be on the safe side for the future. Luckily theDateTime
parser would parse most of the date_time formats we need for now.Allowed date_time formats:
This is a follow-up PR of PR #634 and part of Github issue #633.