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

I get different results running on Mac than running the same in Github #6118

Open
NikPottala opened this issue Apr 12, 2023 · 1 comment
Open

Comments

@NikPottala
Copy link

I'm not a well seasoned javascript programmer but I run the same script side-by-side on my Mac and within a Github codespace and the moment routines returns different results with makes my script useless on Mac. Please advise why this is different. It causes my program to not return proper results running on a Mac.

const startDate = moment(new Date('2023-05-01'));

The above statement running on Mac returns: Sun Apr 30 2023 18:00:00 GMT-0600

Running the same line in a Github codespace returns: Mon May 01 2023 00:00:00 GMT+0600

@projectnoa
Copy link

I believe your issue is that the timezones are different. Since it seems like the Github codespace is taking the GMT+0600 timezone by default and therefore reports a day ahead.

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

No branches or pull requests

2 participants