Added datetime import, not sure how it worked before.

Noticed this from apache logs
Extra ' characters around {} for the values on insert caused eval to
fail on reads.