We are using Postgres 9.2 in suse linux 11 Enterprise server. Recently we have migrated from 8.3 to 9.2 directly using pg_dump and pg_restore as we are not using much postgres extensions. Restore was successful and our application running fine. But in some inserts where we use like to_timestamp('8-5-2013 22:00:02','dd-mm-yyyy hh:mi:ss')::TIMESTAMP it throws error as hour "22" is invalid for the 12-hour clock. But the same insert is working with version 8.3 Only after modifying the to_timestamp with 24hour clock i.e., to_timestamp('8-5-2013 22:00:02','dd-mm-yyyy hh24:mi:ss')::TIMESTAMP, its working fine in version 9.2 Is there any other workaround available instead of modifying multiple queries as lot of our application coding has this conversion.