Fixed incorrect mapping to date-time value.
Added tests.