summaryrefslogtreecommitdiff
path: root/fai_gestion/config/bootstrap.php
diff options
context:
space:
mode:
Diffstat (limited to 'fai_gestion/config/bootstrap.php')
-rw-r--r--fai_gestion/config/bootstrap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/fai_gestion/config/bootstrap.php b/fai_gestion/config/bootstrap.php
index b68fbc9..24f6908 100644
--- a/fai_gestion/config/bootstrap.php
+++ b/fai_gestion/config/bootstrap.php
@@ -43,6 +43,8 @@ use Cake\Log\Log;
use Cake\Mailer\Email;
use Cake\Utility\Inflector;
use Cake\Utility\Security;
+use Cake\I18n\FrozenDate;
+use Cake\I18n\FrozenTime;
/**
* Uncomment block of code below if you want to use `.env` file during development.
@@ -185,9 +187,12 @@ Type::build('time')
Type::build('date')
->useImmutable();
Type::build('datetime')
- ->useImmutable()->useLocaleParser()->setLocaleFormat('yyyy-MM-dd');
+ ->useImmutable();
Type::build('timestamp')
->useImmutable();
+// https://book.cakephp.org/3.0/en/core-libraries/time.html#setting-the-default-locale-and-format-string
+FrozenTime::setToStringFormat('yyyy-MM-dd'); // For any immutable DateTime
+FrozenDate::setToStringFormat('yyyy-MM-dd'); // For any immutable Date
/*
* Custom Inflector rules, can be set to correctly pluralize or singularize