Skip to content

DateTime::createFromFormat with an escaped T, microseconds and a zone offset (Carbon's ISO format) returns false #572

Closed

Description

@blacktrs

Summary

DateTime::createFromFormat with an escaped T, microseconds and a zone offset (Carbon's ISO format) returns false.

Repro

<?php
$e = DateTime::createFromFormat('Y-m-d\TH:i:s.uP', '2026-11-05T11:22:33.000000Z');
echo $e ? $e->format('c') : 'false', "\n";

Expected (php)

2026-11-05T11:22:33+00:00

Actual (manticore 8bcc9d3b, Darwin arm64)

false

Tracking

Known-bug repro: tests/aot/repro/wrong/datetime_createfromformat_iso_micro_zone.php — bash tests/aot/xfail.sh -k datetime_createfromformat_iso_micro_zone reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.

Activity

  1. added
    bug
    wrong-answer
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugwrong-answer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions