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

#1026@patch: ISO formatting of date inputs are no longer system timez… #1027

Closed

Conversation

joeframbach
Copy link

…one dependent.

@joeframbach
Copy link
Author

Doesn't look like github linked the issue although I named it in the title. -> #1026

@capricorn86
Copy link
Owner

capricorn86 commented Sep 14, 2023

Thank you for reporting @joeframbach! 🙂

I'm a bit unsure about changing the time to UTC. This might not be expected when testing or performing server side rendering.

JSDOM seems to work the same way as Happy DOM.

An option might be to send in this as an option in settings? E.g. new Window({ settings: { utcTimezone: true } })

@capricorn86
Copy link
Owner

It should be possible to set timezone for the entire NodeJS process by just adding the environment variable TZ=utc.

Example 1:

     {
           "scripts": {
                 "test": "TZ=utc jest"
            }
     }

Example 2:

process.env.TZ = 'Europe/Amsterdam' 

@capricorn86
Copy link
Owner

capricorn86 commented Oct 27, 2023

Hi again @joeframbach! 🙂

I am sorry, but I think I misunderstood your fix. After looking into it more, I have realized that it should be fixed for all.

It has been fixed by another user in this PR:
#1145

As it has been fixed now, I will close this one.

Thank you again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants