encode epgsql style date to iso8601 style string

I think it's better than manually convert everytime we just need a simple json. Thanks.