Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookbook code for getParseableZonedStringAtInstant is incorrect #328

Closed
gibson042 opened this issue Jan 25, 2020 · 0 comments · Fixed by #482
Closed

Cookbook code for getParseableZonedStringAtInstant is incorrect #328

gibson042 opened this issue Jan 25, 2020 · 0 comments · Fixed by #482
Assignees
Labels
bug documentation Additions to documentation

Comments

@gibson042
Copy link
Collaborator

The code at cookbook/getParseableZonedStringAtInstant.mjs merged by ca126f8 returns strings that lack UTC offset and time zone information required by the use case.

getParseableIanaZonedStringAtInstant(
    Temporal.Absolute.from("2020-01-09T00:00Z"),
    "Europe/Paris"
).replace(/(T\d+:\d+).*?([+-])/, "$1$2") ===
"2020-01-09T01:00+01:00[Europe/Paris]";
@gibson042 gibson042 added bug documentation Additions to documentation labels Jan 25, 2020
@ptomato ptomato self-assigned this Mar 27, 2020
ptomato added a commit that referenced this issue Mar 27, 2020
This makes sure the time zone designation is appended to the string, as
mentioned in the original use case.

Closes: #328
Ms2ger pushed a commit that referenced this issue Mar 30, 2020
This makes sure the time zone designation is appended to the string, as
mentioned in the original use case.

Closes: #328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation Additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants