On Sun, Dec 20, 2009 at 10:36:58PM +0000, Alan Chandler wrote: > Mike Hommey wrote: > >On Sun, Dec 20, 2009 at 09:55:35AM +0000, Alan Chandler wrote: > >>Mike Hommey wrote: > >>>On Sat, Dec 19, 2009 at 11:55:57PM +0000, Alan Chandler wrote: > >>>>BUT I AN NOT IN GMT+1 at that point. I am at GMT. So it SHOULD > >>>>return 0, as do all the other browsers I mention > >>>What does d.getTimezoneOffset() return ? > >>> > >>>Mike > >>On Iceweasel and Konqueror TimezoneOffset gives -60 > >> > >>On Epiphany under Linux and With IE, Chrome, Safari and Safari > >>running in XP in a Virtual Box on the same machine I get > >>TimezoneOffset = 0 > > > >What happens when you set your system date to some time in summer > >time ? > > > >Mike > > I am not sure I did it right, changed with date --set="..." to > sometime in June but I got exactly the same answers.
In the meantime, I got the real issue: you are assuming the time offset is GMT, while it is NOT. When doing Date(0), what you are doing is getting the date at 0 seconds after the first of january, 1970, midnight. Guess what time offset was used at that date ? You would assume GMT, right ? Wrong: RoSPA suggest this would reduce the number of accidents over this period as a result of the lighter evenings, as was demonstrated when the British Standard Time scheme was trialled between 27 October 1968 and 31 October 1971, when Britain remained on GMT+1 all year. Yes, 1 January 1970 0:0:0 was GMT+1. This means Iceweasel and Konqueror are right. And all the others are wrong. $ TZ=Europe/London date -d '1/1/1970 0:0:0' Thu Jan 1 00:00:00 BST 1970 $ TZ=Europe/London date -d '1/1/1970 0:0:0' +%z +0100 Mike -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org