diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index fc7e2fe..fbc9834 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -157,6 +157,9 @@ if( false !== strpos( $sql, 'USE INDEX (comment_date_gmt)')) $sql = str_replace( 'USE INDEX (comment_date_gmt)', '', $sql); + // HB : timestamp fix for permalinks + $sql = str_replace( 'post_date_gmt > 1970', 'post_date_gmt > to_timestamp (\‘1970\')', $sql); + // ZdMultiLang support hacks $sql = preg_replace( '/post_type="([^"]+)"/', 'post_type=\'$1\'', $sql); $sql = str_replace( 'link_url o_url', 'link_url AS o_url', $sql);