From 0d870e8ed788c75083a75e2b8ed29b1519365d84 Mon Sep 17 00:00:00 2001 From: JBthePenguin Date: Sun, 3 Oct 2021 17:24:11 +0200 Subject: [PATCH] remove all setTimestamp(time()) in php files after new DateTime --- src/www/admin/mouvements/entrees/non_repertorie.php | 4 +--- src/www/admin/mouvements/entrees/repertorie.php | 4 +--- src/www/admin/mouvements/entrees/retour.php | 4 +--- src/www/admin/mouvements/sorties/emprunte.php | 4 +--- src/www/admin/mouvements/sorties/stock_disponible.php | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/www/admin/mouvements/entrees/non_repertorie.php b/src/www/admin/mouvements/entrees/non_repertorie.php index 2b972b8..97ff10c 100644 --- a/src/www/admin/mouvements/entrees/non_repertorie.php +++ b/src/www/admin/mouvements/entrees/non_repertorie.php @@ -64,9 +64,7 @@ if (f('save') && $form->check($csrf_key) && !$form->hasErrors()) } // make default date (now) -$date = new \DateTime; -$date->setTimestamp(time()); -$default_date = $date; +$default_date = new \DateTime; // make comment placeholder $comment_placeholder = "ex: don reçu de la part de..."; diff --git a/src/www/admin/mouvements/entrees/repertorie.php b/src/www/admin/mouvements/entrees/repertorie.php index 8399353..8951651 100644 --- a/src/www/admin/mouvements/entrees/repertorie.php +++ b/src/www/admin/mouvements/entrees/repertorie.php @@ -38,9 +38,7 @@ $kinds = $mvt->listEntryKinds(); $selected_kind = $kinds[0]; // make default date (now) -$date = new \DateTime; -$date->setTimestamp(time()); -$default_date = $date; +$default_date = new \DateTime; // make comment placeholder $comment_placeholder = "ex: don reçu de la part de..."; diff --git a/src/www/admin/mouvements/entrees/retour.php b/src/www/admin/mouvements/entrees/retour.php index 2e0f1e3..57507e5 100644 --- a/src/www/admin/mouvements/entrees/retour.php +++ b/src/www/admin/mouvements/entrees/retour.php @@ -48,9 +48,7 @@ if (f('save') && $form->check($csrf_key) && !$form->hasErrors()) } // make default date (now) -$date = new \DateTime; -$date->setTimestamp(time()); -$default_date = $date; +$default_date = new \DateTime; // make comment placeholder $comment_placeholder = "ex: retour de prêt..."; diff --git a/src/www/admin/mouvements/sorties/emprunte.php b/src/www/admin/mouvements/sorties/emprunte.php index c2ff3cb..e3152a9 100644 --- a/src/www/admin/mouvements/sorties/emprunte.php +++ b/src/www/admin/mouvements/sorties/emprunte.php @@ -49,9 +49,7 @@ if (f('save') && $form->check($csrf_key) && !$form->hasErrors()) $eqmts_by_cat = $eqmt->ListAllBorrowedByCategory(); // make default date (now) -$date = new \DateTime; -$date->setTimestamp(time()); -$default_date = $date; +$default_date = new \DateTime; // make comment placeholder $comment_placeholder = "ex: matériel rendu..."; diff --git a/src/www/admin/mouvements/sorties/stock_disponible.php b/src/www/admin/mouvements/sorties/stock_disponible.php index 4568288..abcbd5f 100644 --- a/src/www/admin/mouvements/sorties/stock_disponible.php +++ b/src/www/admin/mouvements/sorties/stock_disponible.php @@ -54,9 +54,7 @@ if (f('save') && $form->check($csrf_key) && !$form->hasErrors()) } // make default date (now) -$date = new \DateTime; -$date->setTimestamp(time()); -$default_date = $date; +$default_date = new \DateTime; // make comment placeholder $comment_placeholder = "ex: don fait à...";