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

Bug#307669: marked as done (localtime return wrong tm->tm_gmtoff, seems zoneinfo data's error)



Your message dated Sun, 22 Apr 2007 12:45:58 +0200
with message-id <20070422104558.GA3719@volta.aurel32.net>
and subject line localtime return wrong tm->tm_gmtoff, seems zoneinfo data's error
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.3.2.ds1-20
Severity: normal

Package: libc6
Version: 2.3.2.ds1-20
Severity: normal



-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-speakup
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information

tm_gmtoff should be 28800 for Etc/GMT+8,
but got -28800,

however, set timezone to Hongkong(which is the same as GMT+8) seems ok.

seems zoneinfo for Etc/GMT+X and Etc/GMT-X are swapped.

below is test code.

#include <time.h>
int main()
{
  struct tm * lt;
  time_t t = time(NULL);
  lt = localtime(&t);
  printf("timezone is %s\n", lt->tm_zone);
  printf("gmtoff is %d\n", lt->tm_gmtoff);
}


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-speakup
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information


--- End Message ---
--- Begin Message ---
On Wed, May 04, 2005 at 07:35:56AM -0800, ca wrote:
> Package: libc6
> Version: 2.3.2.ds1-20
> Severity: normal
> 
> Package: libc6
> Version: 2.3.2.ds1-20
> Severity: normal
> 
> 
> 
> -- System Information:
> Debian Release: 3.1
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: i386 (i686)
> Kernel: Linux 2.4.27-speakup
> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
> 
> Versions of packages libc6 depends on:
> ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl
> 
> -- no debconf information
> 
> tm_gmtoff should be 28800 for Etc/GMT+8,
> but got -28800,
> 
> however, set timezone to Hongkong(which is the same as GMT+8) seems ok.
> 
> seems zoneinfo for Etc/GMT+X and Etc/GMT-X are swapped.
> 
> below is test code.
> 
> #include <time.h>
> int main()
> {
>   struct tm * lt;
>   time_t t = time(NULL);
>   lt = localtime(&t);
>   printf("timezone is %s\n", lt->tm_zone);
>   printf("gmtoff is %d\n", lt->tm_gmtoff);
> }
> 
> 

This is actually noy a bug.  From timezone/etcetera: 

# We use POSIX-style signs in the Zone names and the output abbreviations, 
# even though this is the opposite of what many people expect. 
# POSIX has positive signs west of Greenwich, but many people expect 
# positive signs east of Greenwich.  For example, TZ='Etc/GMT+4' uses 
# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC 
# (i.e. west of Greenwich) even though many people would expect it to 
# mean 4 hours ahead of UTC (i.e. east of Greenwich). 

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

--- End Message ---

Reply to: