Skip to content

Inconsistent DateTime format when using toLocaleString #1333

@bliu13

Description

@bliu13

I don't know if this is related to something on my MacBook, but for some reason, my tests started failing with this:

const timestamp = "2022-05-11T23:23:00-07:00";  // Example timestamp string
DateTime.fromISO(timestamp, { zone: 'America/Los_Angeles' }).toLocaleString(DateTime.DATETIME_FULL);

On any other machine, this is the sample formatted output, but should be correct according to the documentation:
May 12, 2022, 7:00 AM PDT

On my Macbook, I would get this instead:
May 12, 2022 at 7:00 AM PDT

  • OS: MacOS 13.0.1
  • node.js version: 19.1.0
  • Luxon version: 3.1.0
  • Timezone: America/Los_Angeles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions