Using datetime in database instead of timestamp. Closes issue #52