Guest User

Untitled

a guest
Aug 7th, 2018
29
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.         <script src="https://cdnjs.cloudflare.com/ajax/libs/fingerprintjs2/1.8.1/fingerprint2.min.js"></script>
  4.     </head>
  5.     <body>
  6.         <h1 id="result_murmur"></h1>
  7.         <h3 id="result_intl"></h3>
  8.         <h3 id="result_raw"></h3>
  9.         <script>
  10.             function calculate_timezone_changes(step_size, end_date){
  11.                 end_date = end_date || 1514764800000;
  12.                 step_size = step_size || 86400000 * 30; // test offset every 30 days
  13.                 var d = new Date();
  14.                 d.setTime(0);
  15.                 var old_offset = d.getTimezoneOffset();
  16.                 var new_offset, ret = "";
  17.                 for( var i=step_size; i <= end_date; i+=step_size ){
  18.                    d.setTime(i);
  19.                    new_offset = d.getTimezoneOffset();
  20.                    if(old_offset != new_offset){
  21.                        ret += (old_offset-new_offset) + "@" + (i/1000) + ",";
  22.                        old_offset = new_offset;
  23.                    }
  24.                }
  25.                return ret;
  26.            }
  27.            var raw = calculate_timezone_changes();
  28.            document.getElementById('result_raw').textContent = "Raw: " + raw;
  29.            document.getElementById('result_murmur').textContent = "Hash: " + Fingerprint2.prototype.x64hash128(raw);
  30.            document.getElementById('result_intl').textContent = "From Intl.DateTimeFormat: " + new Intl.DateTimeFormat().resolvedOptions().timeZone;
  31.        </script>
  32.     </body>
  33. </html>
RAW Paste Data