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

Timezone challenge for test408.js #1587

Open
jimmywarting opened this issue Dec 21, 2022 · 1 comment
Open

Timezone challenge for test408.js #1587

jimmywarting opened this issue Dec 21, 2022 · 1 comment

Comments

@jimmywarting
Copy link
Contributor

jimmywarting commented Dec 21, 2022

Not sure of how to solve this. haven't dig into this one so much yet. maybe anyone else know of any solution.
or maybe it should just be skipped all together in browsers?

it seems to currently be dependent on setting

if (globalThis.process) {
globalThis.process.env.TZ = 'UTC';
}

but only in NodeJS where process exist. it seems to do some magic that i did not know about was a thing that you could do

either way... i live in a timezone with +1 so the result was incorrect with an 1hour offset from the expected result
maybe there is some js solution to encode things to utc if that's the intended format?

anyway. it blocks #1586 for now. don't know if it should be put in as something NodeJS specific.

@mathiasrw
Copy link
Member

Another solution is to have the dates in the expected results calculated by the environment so that we verify that the conversion in AlaSQL is the same as the corresponding conversion in "vanila" js.

@mathiasrw mathiasrw changed the title solve test 408 Timezone challenge for test408.js Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants