Incorrect javascript date during WW2

66 views
Skip to first unread message

Miro

unread,
May 30, 2012, 9:22:03 AM5/30/12
to Chromium-discuss
Hi all,

I was wondering if you'd help me out. It seems there is a discrepancy
in Europe/Zagreb timezone information during WW2 between Chromium and
(Linux or Java). Here are a few examples highlighting what I mean:

// Evaluating in Chromium
new Date("1941-12-31T22:00:00Z")
// output: Wed Dec 31 1941 23:00:00 GMT+0100 (CET)

# Evaluating in Linux command line
$ LANG=hr_.HR.utf-8 TZ=Europe/Zagreb date -d '1941-12-31 22:00 UTC'
+'%c %z'
# output: Thu Jan 1 00:00:00 1942 +0200

// Evaluating in Java
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-
dd'T'HH:mm:ss'Z'");
df.setTimeZone(TimeZone.getTimeZone("GMT"));
df.parse("1941-12-31T22:00:00Z");
// output: Thu Jan 01 00:00:00 CEST 1942


IE9 in Windows behaves the same as Chromium. Also, I'd leave Firefox
out of the discussion since it has a bug regarding double summer time:
https://bugzilla.mozilla.org/show_bug.cgi?id=704486

As examples show, Chromium thinks that "1941-12-31T22:00:00Z" in
Europe/Zagreb timezone is 1941-12-31 while Linux and Java think it's
1942-01-01. The main difference, I believe, is that Chromium uses CET
while Linux and Java uses CEST (CET + summer time). Would you point me
in the right direction so we can have this bug resolved?

Enviroment that I'm using:
Arch Linux ("uname -srm": Linux 3.3.7-1-ARCH x86_64)
Chromium: http://www.archlinux.org/packages/extra/x86_64/chromium/
tzdata package: http://www.archlinux.org/packages/core/any/tzdata/

Kind Regards

Miro

unread,
May 30, 2012, 9:25:15 AM5/30/12
to Chromium-discuss
I forgot to attach output from `zdump', so here it is:

8<---------------------------------------------------------
$ zdump -v -c1940,1946 Europe/Zagreb
Europe/Zagreb -9223372036854775808 = NULL
Europe/Zagreb -9223372036854689408 = NULL
Europe/Zagreb Fri Apr 18 21:59:59 1941 UTC = Fri Apr 18 22:59:59 1941
CET isdst=0
Europe/Zagreb Fri Apr 18 22:00:00 1941 UTC = Sat Apr 19 00:00:00 1941
CEST isdst=1
Europe/Zagreb Mon Nov 2 00:59:59 1942 UTC = Mon Nov 2 02:59:59 1942
CEST isdst=1
Europe/Zagreb Mon Nov 2 01:00:00 1942 UTC = Mon Nov 2 02:00:00 1942
CET isdst=0
Europe/Zagreb Mon Mar 29 00:59:59 1943 UTC = Mon Mar 29 01:59:59 1943
CET isdst=0
Europe/Zagreb Mon Mar 29 01:00:00 1943 UTC = Mon Mar 29 03:00:00 1943
CEST isdst=1
Europe/Zagreb Mon Oct 4 00:59:59 1943 UTC = Mon Oct 4 02:59:59 1943
CEST isdst=1
Europe/Zagreb Mon Oct 4 01:00:00 1943 UTC = Mon Oct 4 02:00:00 1943
CET isdst=0
Europe/Zagreb Mon Apr 3 00:59:59 1944 UTC = Mon Apr 3 01:59:59 1944
CET isdst=0
Europe/Zagreb Mon Apr 3 01:00:00 1944 UTC = Mon Apr 3 03:00:00 1944
CEST isdst=1
Europe/Zagreb Mon Oct 2 00:59:59 1944 UTC = Mon Oct 2 02:59:59 1944
CEST isdst=1
Europe/Zagreb Mon Oct 2 01:00:00 1944 UTC = Mon Oct 2 02:00:00 1944
CET isdst=0
Europe/Zagreb Tue May 8 00:59:59 1945 UTC = Tue May 8 01:59:59 1945
CET isdst=0
Europe/Zagreb Tue May 8 01:00:00 1945 UTC = Tue May 8 03:00:00 1945
CEST isdst=1
Europe/Zagreb Sun Sep 16 00:59:59 1945 UTC = Sun Sep 16 02:59:59 1945
CEST isdst=1
Europe/Zagreb Sun Sep 16 01:00:00 1945 UTC = Sun Sep 16 02:00:00 1945
CET isdst=0
Europe/Zagreb 9223372036854689407 = NULL
Europe/Zagreb 9223372036854775807 = NULL
--------------------------------------------------------->8

Output shows that double summer time (+2h) was in place from Apr 16
1941 until 2 Nov 1942. At least according to tzdata in Linux.

Kind regards

Chris Bentzel

unread,
May 30, 2012, 9:58:24 AM5/30/12
to disponi...@yahoo.com, Chromium-discuss
Could you enter a bug at http://new.crbug.com?

--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-discuss

Miro

unread,
May 30, 2012, 10:58:37 AM5/30/12
to Chromium-discuss
Done.

https://code.google.com/p/chromium/issues/detail?id=130292

On May 30, 3:58 pm, Chris Bentzel <cbent...@chromium.org> wrote:
> Could you enter a bug athttp://new.crbug.com?
> > Chromium Discussion mailing list: chromium-disc...@chromium.org
Reply all
Reply to author
Forward
0 new messages