xref: /PHP-8.1/ext/date/tests/gh9699.phpt (revision d0218511)
1--TEST--
2Bug GH-9699 (DateTimeImmutable::diff differences in 8.1.10 onwards - timezone related)
3--FILE--
4<?php
5
6$date = new DateTimeImmutable('2022-10-09 02:41:54.515330', new DateTimeZone('America/Los_Angeles'));
7$now = new DateTimeImmutable('2022-10-10 08:41:54.534620', new DateTimeZone('UTC'));
8
9echo $date->diff($now)->format("%R %Y %M %D %H %I %S %F"), "\n";
10?>
11--EXPECT--
12+ 00 00 00 23 00 00 019290
13