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

Bug#307669: localtime return wrong tm->tm_gmtoff, seems zoneinfo data's error



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



Reply to: