From 8396110d2e54b7081ce7c3e5b464285d1340c48a Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Thu, 13 Jun 2024 13:38:58 +0200 Subject: [PATCH] date --- app/CustomFuncPao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 95df3b93..8caeed14 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -323,7 +323,7 @@ function libriInPrevendita() ->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '<', 0) ->where('DescrizioneFormato', 'brossura') // ->where('DescrizioneTipologia', 'Libri') - ->where(DB::raw('UNIX_TIMESTAMP(DataOra)'), '>', 0) // Verifica che DataOra sia maggiore del 01-01-1970 + ->where(DB::raw('DATEDIFF(second, \'1970-01-01\', DataOra)'), '>', 0) ->orderBy('DataPubblicazione', 'desc') ->get(); $sep = ' | ';