javascript - Date.getTimezoneOffset returns wrong results? -


tested brasilian time zone. change on system if not brasil. here code:

var b = new date(2013, 9, 20, 0, 0, 0); var bt = b.gettime(); var bof = b.gettimezoneoffset(); // in hours var m = 60*1000; // minutes * miliseconds  var utctime1 = bt - bof*m; var utctime2 = date.utc(2013, 9, 20, 0, 0, 0);  return utctime1 == utctime2; 

returns false, meaning timestamps different.

upon further investigation, seems 20.10.2013 0:00 js returns timestamp 1 time zone timezoneoffset other one. there error or making / thinking wrong?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -