Your script doesn't work for me. It correctly picks up the timezone offset (but that's the easy part... Date.timeZoneOffset() would do the same), but it states that DST is "NOT observed here", but it is (and I'm currently on DST here in the UK).
I think the script should state "DST is observed here" if your region switches to DST at some point, not whether you are currently on DST or not.
HOWEVER, and this is the problem, the script assumes DST switches at some point between June 1 and July 1 (date1 and date2 respt). What region is that? In the UK DST starts at the end of March. The script needs to test a date on either side of the switch, apart from that the dates really don't matter (I don't think).
If I change:
var date1 = new Date(rightNow.getFullYear(), 5, 1, 0, 0, 0, 0);
To
var date1 = new Date(rightNow.getFullYear(), 0, 1, 0, 0, 0, 0); // 0 - January
This then works for me. I think it will also work for the original region. Does it work for everyone? With the dates 6 months apart, I think it stands a good chance. But elsewhere in the world DST could start at anytime and last for longer than 6 months?! In the UK DST lasts for 7 months.
With these last points in mind I have my doubts whether you can write a compact JavaScript function that is able to test DST that will work worldwide, without looking up some local knowledge? How variable is DST around the world?
Actually, I wonder... if you know the timezone offset, can you make an intelligent assumption as to when the DST
might be? eg. If offset is 0 or 1 then DST changes in March, then work backwards... If offset is -1, assume DST changes in February... etc?