I am using a vpn. My web browser is chrome.
When registering to a particular site, I gave a different location. The site gives me a notification every 10PM. The problem is it is giving notification in my local time not in the time-zone from which I have registered to the site.
The permission that are allowed to the site are
Motion sensors
JavaScript
Images
Background sync
Payment Handlers
No, Permission for Location
is not allowed.
How does the site know my local time-zone though I am using a vpn.
Can a web browser take time from the machine and send it to the server via HTTP header or something?
What is going on here?
P.S. Just to be clear, it is not a browser notification which is allowed by Notifications
in chrome browser. It is like stackoverflow notification (top right of the browser windows). One more thing, I access that site from a linux desktop and not a mobile device. Not sure, what that Motion sensors
permission is doing there in my desktop.
I may be missing something, but if you press F12 in your browser, and type this:console.log(`Time offset is ${-new Date().getTimezoneOffset()/60} hours`);
, you can see your time offset, and if you type console.log(new Date());
, you can see your current time.
That information can be sent when you're logging in.
document.getElementById('current-time').innerText = `Current date: ${new Date}\nTime Offset: ${-new Date().getTimezoneOffset()/60} hours`;
<div id="current-time">
</div>
EDIT:
Time zone offset code is adapted from this answer.