Please note that the first published answer only works in half of all cases, so on average it doesn't work at all.
The first of January, as you know, is not in the summer only in the northern hemisphere. However, this is only half the world.
var jan = new Date( 2009, 0, 1, 2, 0, 0 ), jul = new Date( 2009, 6, 1, 2, 0, 0 ); var offset = ( jan.getTime() % 24 * 60 * 60 * 1000 ) > ( jul.getTime() % 24 * 60 * 60 * 1000 ) ?jan.getTimezoneOffset() : jul.getTimezoneOffset();
source share