Skip to content

DateTime.tryParse non consistent behavior across platforms #56444

Open
@vasilich6107

Description

Steps to reproduce

Run reproduction code on iOS, Android, Web

Expected results

Consistent result.

Actual results

ios/anroid parses phone number into date time

Code sample

Code sample
Text(
              (DateTime.tryParse('+6477191451')?.toIso8601String()).toString(),
            ),

Screenshots or Video

Screenshots / Video demonstration image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.24.0-1.0.pre.533, on macOS 14.5 23F79 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
[✓] IntelliJ IDEA Community Edition (version 2023.1.5)
[✓] IntelliJ IDEA Community Edition (version 2024.1.3)
[✓] IntelliJ IDEA Community Edition (version 2023.1.5)
[✓] VS Code (version 1.90.1)
[✓] Connected device (7 available)
    ! Error: Browsing on the local area network for iPad (2). Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-coretriagedIssue has been triaged by sub teamtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions