You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpdate_default_timezone_set('Europe/Berlin');
$date = new \DateTime('2023-01-25T00:00:00');
echo$date->format('p');
?>
For missing offset is default offset:
Expected result: +01:00
For explicit offset +00:00
Expected result: +00:00
Or !localtime a6e3ce4#diff-975ac482adc74b487c6ac9d8dde32153e4b8a803ef8ec41e8d6594f0a042db69R715
Expected result with p and timezone UTC
$date2 = new DateTime('now', new DateTimeZone('UTC'));
echo $date2->format('p'); // Z
I assumed it had been verified because the "needs triage" was removed. Though I did briefly confirm that "p" wasn't outputting just Z which it's documented to do.
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
8.2.1
Operating System
MacOS Monterey (12.6.3)
The text was updated successfully, but these errors were encountered: