Fix for datetime saving on PHP < 5.3