Fix regression in custom date fields

When localized date formatting was implemented, saving of those dates in the
database was broken. This fix correctly handles custom date fields to/from
the database.
Merge pull request #101 from greezybacon/hotfix/custom-date-fields

Fix regression in custom date fields

Reviewed-By: Peter Rotich <peter@osticket.com>