silverstripe/silverstripe-framework — pull request #2164 by tractorcow (2013-06-28 04:28:50+00:00)
Title: BUG Fixed DateTimeField where time value was being parsed incorrectly.

When the current user's locale has AM/PM included, the time field would attempt to parse this value, but before using the same locale parse string, it would run it past the ISO time format string (which ommits the AM/PM). Since the matching was a bit slack, it would think these times were actually ISO, and would parse this in. Of course, the AM/PM would get lost.

This fix changes the parsing mechanism to still do these checks in the correct order, but will only match the ISO format against the presented value if it matches exactly (which is tested by writing the parsed value out and comparing this to the input).

Issue first noted at http://www.silverstripe.org/content-editor-discussions/show/24005