fix time sql serialization.

In the original implementation, time values were incorrectly encoded as sql strings with 4 single quotes, i.e.,
''2006-01-02 15:04:05''.  This is of course invalid.