Skip to content

Conversation

@jasnell
Copy link
Member

@jasnelljasnell commented May 11, 2021

Fixes: #4230
Signed-off-by: James M Snell [email protected]

Update: Even tho this is semver-patch, I'm marking it as a notable change for when it lands. The bug was first reported back in Dec 2015, it was closed for a while, one partial attempt at fixing it was made a couple of years ago, and this completes the fix.

/cc @targos@srl295

@github-actionsgithub-actionsbot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 11, 2021
@srl295
Copy link
Member

srl295 commented May 12, 2021

Might just have NODE_DEFAULT_ZONE instead of trying to emulate TZ. don't use abbrevs just tz IDs like America/Los_Angeles.

@jasnelljasnellforce-pushed the datetime-change-notify branch from f3f8c3a to e59351bCompareMay 12, 2021 02:22
@jasnell
Copy link
MemberAuthor

@srl295:

Might just have NODE_DEFAULT_ZONE instead of trying to emulate TZ.

In the current version of the PR, use of set TZ="..." does work. Is there a particular limitation here that would make it undesirable? What would using NODE_DEFAULT_ZONE give us? My concern would be introducing something that is inconsistent with TZ on non-windows systems.

@jasnelljasnell marked this pull request as ready for review May 12, 2021 02:25
@srl295
Copy link
Member

@srl295:

Might just have NODE_DEFAULT_ZONE instead of trying to emulate TZ.

In the current version of the PR, use of set TZ="..." does work. Is there a particular limitation here that would make it undesirable? What would using NODE_DEFAULT_ZONE give us? My concern would be introducing something that is inconsistent with TZ on non-windows systems.

What matt was alluding to is that it's already inconsistent. Posix does a bunch of other processing. Node-default-zone would make it clear we are simply choosing a new default zone by the full id rather than trying To emulate Posix TZ on windows.

Copy link
Member

@srl295srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll say lgtm with caveats that it will not be === TZ behavior on posix, suggestions as noted in thread.

@jasnell
Copy link
MemberAuthor

I'll say lgtm with caveats that it will not be === TZ behavior on posix, suggestions as noted in thread.

Understood. I think those differences will be ok here. I'll try to find a good place to describe those differences in the docs

@nodejs-github-bot

This comment has been minimized.

@srl295
Copy link
Member

srl295 commented May 12, 2021

I'll say lgtm with caveats that it will not be === TZ behavior on posix, suggestions as noted in thread.

Understood. I think those differences will be ok here. I'll try to find a good place to describe those differences in the docs

one reference: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html
ICU won't necessarily handle those completely either, but it will try to find a matching zone.
Perhaps something like this:

While the TZ env variable on Node.js won't handle all of the various ways that the TZ variable is handled in other environments, it will support tz ids (such as Etc/UTC, Europe/Paris or America/New_York. It may support a few other abbreviations or aliases, but these are strongly discouraged.

sorry not sorry for being a stick in the timezone mud :)

@jasnelljasnellforce-pushed the datetime-change-notify branch 2 times, most recently from 3f15012 to cc783d2CompareMay 12, 2021 19:42
Copy link
Member

@srl295srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🇮🇪

@jasnelljasnellforce-pushed the datetime-change-notify branch from cc783d2 to 9d30626CompareMay 12, 2021 19:50
@nodejs-github-bot

This comment has been minimized.

@jasnelljasnellforce-pushed the datetime-change-notify branch from 9d30626 to 311265aCompareMay 12, 2021 20:11
Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jasnelljasnellforce-pushed the datetime-change-notify branch from abcc357 to 4793754CompareMay 13, 2021 03:34
@jasnelljasnell requested a review from addaleaxMay 13, 2021 03:35
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@jasnelljasnellforce-pushed the datetime-change-notify branch from 5fd73e8 to b6a0facCompareMay 14, 2021 01:17
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@srl295srl295 added the i18n-api Issues and PRs related to the i18n implementation. label May 14, 2021
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented May 14, 2021

@jasnell
Copy link
MemberAuthor

Landed in 16cb4f7

@jasnelljasnell closed this May 17, 2021
jasnell added a commit that referenced this pull request May 17, 2021
Fixes: #4230 Signed-off-by: James M Snell <[email protected]> PR-URL: #38642 Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
@jasnelljasnell added the notable-change PRs with changes that should be highlighted in changelogs. label May 17, 2021
targos pushed a commit that referenced this pull request May 18, 2021
Fixes: #4230 Signed-off-by: James M Snell <[email protected]> PR-URL: #38642 Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
targos added a commit that referenced this pull request May 18, 2021
Notable changes: async_hooks: * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) #36394 lib: * support setting process.env.TZ on windows (James M Snell) #38642 module: * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587 process: * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659 util: * (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) #38619 PR-URL: #38719
@targostargos mentioned this pull request May 18, 2021
targos added a commit that referenced this pull request May 18, 2021
Notable changes: async_hooks: * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) #36394 lib: * support setting process.env.TZ on windows (James M Snell) #38642 module: * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587 process: * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659 util: * (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) #38619 PR-URL: #38719
targos added a commit that referenced this pull request May 19, 2021
Notable changes: async_hooks: * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) #36394 lib: * support setting process.env.TZ on windows (James M Snell) #38642 module: * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587 process: * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659 util: * (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) #38619 PR-URL: #38719
targos added a commit that referenced this pull request May 19, 2021
Notable changes: async_hooks: * (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) #36394 lib: * support setting process.env.TZ on windows (James M Snell) #38642 module: * (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) #38587 process: * (SEMVER-MINOR) add `'worker'` event (James M Snell) #38659 util: * (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) #38619 PR-URL: #38719
codebytere added a commit to electron/electron that referenced this pull request May 19, 2021
codebytere added a commit to electron/electron that referenced this pull request May 20, 2021
codebytere added a commit to electron/electron that referenced this pull request May 31, 2021
codebytere added a commit to electron/electron that referenced this pull request May 31, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 8, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 9, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 10, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.i18n-apiIssues and PRs related to the i18n implementation.notable-changePRs with changes that should be highlighted in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I can't set a default timezone on windows.

7 participants

@jasnell@srl295@nodejs-github-bot@mcollina@addaleax@shalvah@targos