postgres: Use timestamp comparison instead of timezone offset comparison for detecting the default timestamp
refs #7919
This commit is contained in:
parent
09d5ec6b7a
commit
56640fa64f
|
@ -324,8 +324,8 @@ abstract class IdoQuery extends DbQuery
|
|||
$value = preg_replace('/ COLLATE .+$/', '', $value);
|
||||
$value = preg_replace('/inet_aton\(([[:word:].]+)\)/i', '$1::inet - \'0.0.0.0\'', $value);
|
||||
$value = preg_replace(
|
||||
'/(UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\)))/i',
|
||||
'CASE WHEN ($1 = EXTRACT(TIMEZONE FROM NOW()) * -1) THEN 0 ELSE $1 END',
|
||||
'/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i',
|
||||
'CASE WHEN ($1 < \'1970-01-03 00:00:00+00\'::timestamp with time zone) THEN 0 ELSE UNIX_TIMESTAMP($1) END',
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue