mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 15:20:32 -04:00
Switch from DateTime to DateTimeImmutable across codebase
This commit is contained in:
parent
92c647f2b1
commit
e55fecaaa2
35 changed files with 102 additions and 99 deletions
|
@ -1,5 +1,5 @@
|
|||
<?
|
||||
use Safe\DateTime;
|
||||
use Safe\DateTimeImmutable;
|
||||
use function Safe\preg_match;
|
||||
use function Safe\posix_getpwuid;
|
||||
|
||||
|
@ -199,7 +199,7 @@ class DbConnection{
|
|||
switch($metadata[$i]['native_type'] ?? null){
|
||||
case 'DATETIME':
|
||||
case 'TIMESTAMP':
|
||||
$object->{$metadata[$i]['name']} = new DateTime($row[$i], new DateTimeZone('UTC'));
|
||||
$object->{$metadata[$i]['name']} = new DateTimeImmutable($row[$i], new DateTimeZone('UTC'));
|
||||
break;
|
||||
|
||||
case 'LONG':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue