Fix PG timestamp. Use typcast.

This commit is contained in:
Yurii
2026-05-22 15:09:35 +03:00
parent 7803cf0692
commit 2318b5dc3b

View File

@@ -174,7 +174,7 @@ class PostgresqlQueryComposer extends BaseQueryComposer
if ($function === 'UNIX_TIMESTAMP') {
$arg = $argumentPartList[0] ?? 'NOW()';
return "FLOOR(EXTRACT(EPOCH FROM $arg))";
return "FLOOR(EXTRACT(EPOCH FROM $arg::timestamp))";
}
if ($function === 'BINARY') {