Unix time to postgreSQL date

We are passing Unix time through JSON string. What script should be run to convert the Unix time to Postgres date so that the value is inserted properly in database.