added some generic postegres code to send times to the database as iso8601