8000 Fix timezone in Δnow · symfony/symfony@0451c8c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0451c8c

Browse files
committed
Fix timezone in Δnow
1 parent 19de092 commit 0451c8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/Caster/DateCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function castDate(DateTimeInterface $d, $a, Stub $stub, $isNested,
3131
$prefix.'literal' => $d->format('l, j M Y'),
3232
$prefix.'timestamp' => $d->getTimestamp(),
3333
$prefix.'timezone' => $d->format('P (e)'),
34-
$prefix.'Δnow' => (new DateTime())->diff($d)->format('%R %yy %mm %dd %H:%I:%S'),
34+
$prefix.'Δnow' => (new DateTime('now', $d->getTimezone()))->diff($d)->format('%R %yy %mm %dd %H:%I:%S'),
3535
);
3636
}
3737
}

0 commit comments

Comments
 (0)
0