gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: Bug#409784: tzdata is wrong for epoch in Europe/London


From: Aurelien Jarno
Subject: [Gnash-dev] Re: Bug#409784: tzdata is wrong for epoch in Europe/London
Date: Mon, 05 Feb 2007 15:19:51 +0100
User-agent: IceDove 1.5.0.9 (X11/20061220)

Martin Guy a écrit :
> Package: tzdata
> Version: 2006p-1
> 
> localtime() resolves time==0 as Jan 1 1970 01:00 instead of 00:00 in
> the Europe/London timezone. This was in etch; it also does this in
> Debian sarge and gentoo, so I guess it's an old upstream bug.
> 
> It may be a bug in localtime() but certainly depends on the named
> timezone (see below).
> 
> I'm amazed no one has spotted this before!
> In fact, versions of libc/zoneinfo from 2000 (libc2.1.3) behave the same.
> Is there something I'm missing here?
> 
> Repeat-by:
> cat >> c.c << EOF
> #include <time.h>
> #include <stdio.h>
> 
> extern long timezone;   /* Seconds west of gmt */
> 
> main()
> {
>         time_t t = 0;
>         struct tm *tmp;
> 
>         printf("Epoch in gmtime is %s", asctime(gmtime(&t)));
>         printf("Epoch in localtime is %s", asctime(tmp = localtime(&t)));
>         printf("timezone is %ld minutes east of UTC\n", -timezone/60);
>         printf("DST was%s in effect\n", tmp->tm_isdst ? "" : "n't");
> }
> EOF
> $ cc c.c
> $ TZ=Europe/London ./a,out      # Europe/London is broken.
> Epoch in gmtime is Thu Jan  1 00:00:00 1970
> Epoch in localtime is Thu Jan  1 01:00:00 1970

Between 1968 and 1971, the United Kingdom used the GMT+1 time all year.
See http://en.wikipedia.org/wiki/British_Summer_Time for the details.

The returned result is correct, I am therefore closing this bug.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]