Add test for time input with interval on first hour of the day
Add additional tests and fix incorrect meridian selection

When dates around midnight were used with interval + 12hr formats, the
incorrect meridian was selected.

Refs #GH-1237
Remove silly code.

Changing the 12'th hour into 0 shouldn't be done when figuring out the
meridian, it makes sorting things out later more complicated. Remove
some duplicated code.
Merge branch 'master-time'

See #GH-1237