Skip to content

toLocaleTimeString regression in v18 #46571

@chernodub

Description

@chernodub

Version

v18.14.0

Platform

Darwin MacBook-Pro.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

  1. Run node
  2. Log new Date().toLocaleTimeString('en').charCodeAt(7) to see the char code of the space
  3. See the result, it's 8239

How often does it reproduce? Is there a required condition?

100% of runs

What is the expected behavior?

The code of the space here should supposably be 32, at least that's what I see when running in Chrome 109.0.5414.119 and Node v16.19.0.

What do you see instead?

The code of the space is - 8239

Additional information

This causes issues when running hydration in NextJS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues and PRs that are duplicates of other issues or PRs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions