To see what would happen, I attempted to access Hulu from a VPN outside the US. As I expected, Hulu detected the VPN. My understanding is that this is because Hulu is aware of the IP address ranges that belong to known VPNs. However, what caught me by surprise was Hulu's ability to display the time of the incident in my local time zone. How can this be possible? How does Hulu know in which time zone I am actually located?
-
4javascript maybe or DNS leaks– yeah_wellCommented Aug 2, 2019 at 18:38
-
Simple Javascript - which is running locally in your browser. See also How to get the exact local time of client?.– Steffen UllrichCommented Aug 2, 2019 at 18:42
-
Can you elaborate? My browser does not have access to my location services (running Chrome on macOS), so I don't see how javascript would do it. How would DNS leaks cause it either? I have my machine set to use google's (8.8.8.8 and 8.8.4.4)– saltthehashCommented Aug 2, 2019 at 18:43
-
@SteffenUllrich ah i see, I was making a bigger assumption. So what you're saying is just that the javascript relies on simple client side APIs to print a timestamp in my local time zone, Hulu is not actually able to detect where I am?– saltthehashCommented Aug 2, 2019 at 18:44
-
1Change the time zone on your computer and see if it changes.– john doeCommented Aug 2, 2019 at 19:07
|
Show 2 more comments
1 Answer
By asking your browser for the current time zone offset, e.g.
var d = new Date();
console.log(d.getTimezoneOffset())
Since I'm in the US/Pacific time zone and it's currently summertime, this returns 420 (7 x 60) for me.
With a bit of additional clever code, it's possible to estimate the exact time zone, rather than just the current offset.