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 difference #2

Open
sebastianwr opened this issue Mar 20, 2017 · 2 comments
Open

Timezone difference #2

sebastianwr opened this issue Mar 20, 2017 · 2 comments

Comments

@sebastianwr
Copy link

sebastianwr commented Mar 20, 2017

Hi! I think it's better suited here as on HN.

Something about the timezone consideration seems to be off. I run a query from my hometown to my work place and both locations as well as me right now are in the same timezone.

But the console log shows:

[Log]   Query timezone offset:  – 1 (commute-time.js, line 185)
[Log]   Local timezone offset:  – -2 (commute-time.js, line 186)
[Log]   Hour adjust - subtracting -1 hours. (commute-time.js, line 187)
[Log]   Monday, 6am (target) is the same as following local time: (commute-time.js, line 188)
[Log]   Mon Mar 27 2017 07:00:00 GMT+0200 (CEST) (commute-time.js, line 189)

If I can be of any help, let me know!

@pminkov
Copy link
Owner

pminkov commented Mar 20, 2017

The time zone for Essen is GMT+1. So Google's TZ API seems to get that right.

However, the timezone coming from your browser looks wrong (GMT+2).

What do you see when you type this in your browser:

new Date();
Mon Mar 20 2017 13:04:53 GMT-0700 (PDT)

Does the time zone match your real time zone?

@sebastianwr
Copy link
Author

Safari output was looking correct (GMT+1, CET). But I just looked at the code of the debug output and saw that you take the next Monday.

On Saturday we will change to summer time (GMT+2, CEST). That was tricky ;)

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