When instantiating a date in Javascript the timezone-offset differs depending on the year. I live in Belgium so the utc timezone offset is +1.
Starting from year 1943 the timezone seems to be as expected but before it gives different result depending on the year.
For example (you can try it out in jsfiddle.net):
// All dates are 1 january, only the year differs
console.log(new Date(1900,0,1).toString())
// Mon Jan 01 1900 00:00:00 GMT+0000 (Central European Standard Time)
console.log(new Date(1940,0,1).toString())
// Mon Jan 01 1940 00:00:00 GMT+0000 (Central European Standard Time)
console.log(new Date(1941,0,1).toString())
// Wed Jan 01 1941 00:00:00 GMT+0200 (Central European Standard Time)
console.log(new Date(1943,0,1).toString())
// Fri Jan 01 1943 00:00:00 GMT+0100 (Central European Standard Time)
console.log(new Date(2013,0,1).toString())
// Tue Jan 01 2013 00:00:00 GMT+0100 (Central European Standard Time)
Can someone explain why the timezone offset differs depending on the year?
That's because of the Daylight saving time offset and time zone offset changes. A country's government could change them periodically.
That's the reason you shouldn't do your datetime math manually on seconds but use JS Date functions. JS has full knowledge of the history of DST and time zone changes for a particular location / time zone label.