Y’all are asking for future trouble. If you can use a named query, then there is NO reason to convert your timestamp to a string and then back to a timestamp in PostgreSQL. Simply use a value parameter of type datetime (which is perfectly compatible with PostgreSQL timestamptz and friends). The precise UTC value of your timestamp will be passed in binary format through JDBC. Faster, too.
If you are formatting a date/time as a string to get your DB to interpret it, you are almost certainly screwing up.