zdump returns incorrect transitions for Africa/Casablanca and Africa/El_Aaiun

Bug #1587128 reported by Philip Ross
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 16.04 LTS amd64
libc-bin 2.23-0ubuntu3
tzdata 2016d-0ubuntu0.16.04

The Africa/Casablanca and Africa/El_Aaiun time zones in the 2016d-0ubuntu0.16.04 tzdata package have transitions from daylight savings to standard time at 02:00 UTC on 2037-10-04 (see https://github.com/eggert/tz/blob/2016d/africa#L892).

The time zone files (/usr/share/zoneinfo/Africa/Casablanca and /usr/share/zoneinfo/Africa/El_Aaiun) both contain the correct transition time (Unix timestamp 0x7f72de20) in the 32-bit and 64-bit sections:

$ hd -s 0x1b8 -n 4 /usr/share/zoneinfo/Africa/Casablanca
000001b8 7f 72 de 20 |.r. |
000001bc

$ hd -s 0x59d -n 8 /usr/share/zoneinfo/Africa/Casablanca
0000059d 00 00 00 00 7f 72 de 20 |.....r. |
000005a5

$ hd -s 0x18c -n 4 /usr/share/zoneinfo/Africa/El_Aaiun
0000018c 7f 72 de 20 |.r. |
00000190

$ hd -s 0x506 -n 8 /usr/share/zoneinfo/Africa/El_Aaiun
00000506 00 00 00 00 7f 72 de 20 |.....r. |
0000050e

However zdump (from libc-bin 2.23-0ubuntu3) incorrectly shows that the transitions for both time zones occur on 2037-10-25 instead of 2037-10-04:

$ zdump -v -c 2037,2038 /usr/share/zoneinfo/Africa/Casablanca | grep Oct
/usr/share/zoneinfo/Africa/Casablanca Sun Oct 25 01:59:59 2037 UT = Sun Oct 25 02:59:59 2037 WEST isdst=1 gmtoff=3600
/usr/share/zoneinfo/Africa/Casablanca Sun Oct 25 02:00:00 2037 UT = Sun Oct 25 02:00:00 2037 WET isdst=0 gmtoff=0

$ zdump -v -c 2037,2038 /usr/share/zoneinfo/Africa/El_Aaiun | grep Oct
/usr/share/zoneinfo/Africa/El_Aaiun Sun Oct 25 01:59:59 2037 UT = Sun Oct 25 02:59:59 2037 WEST isdst=1 gmtoff=3600
/usr/share/zoneinfo/Africa/El_Aaiun Sun Oct 25 02:00:00 2037 UT = Sun Oct 25 02:00:00 2037 WET isdst=0 gmtoff=0

The copy of zdump.c released with glibc 2.23 is identical to zdump.c in the tzcode2015g release from the IANA Timezone Database (https://www.iana.org/time-zones/repository/releases/tzcode2015g.tar.gz).

I have compiled the IANA Timezone Database 2015g version of zdump with the default options and it produces the correct results for the Ubuntu-distributed Africa/Casablanca and Africa/El_Aaiun time zone files:

$ ~/tz/2015g/zdump --version
zdump (tzcode) 2015g

$ ~/tz/2015g/zdump -v -c 2037,2038 /usr/share/zoneinfo/Africa/Casablanca | grep Oct
/usr/share/zoneinfo/Africa/Casablanca Sun Oct 4 01:59:59 2037 UT = Sun Oct 4 02:59:59 2037 WEST isdst=1 gmtoff=3600
/usr/share/zoneinfo/Africa/Casablanca Sun Oct 4 02:00:00 2037 UT = Sun Oct 4 02:00:00 2037 WET isdst=0 gmtoff=0

$ ~/tz/2015g/zdump -v -c 2037,2038 /usr/share/zoneinfo/Africa/El_Aaiun | grep Oct
/usr/share/zoneinfo/Africa/El_Aaiun Sun Oct 4 01:59:59 2037 UT = Sun Oct 4 02:59:59 2037 WEST isdst=1 gmtoff=3600
/usr/share/zoneinfo/Africa/El_Aaiun Sun Oct 4 02:00:00 2037 UT = Sun Oct 4 02:00:00 2037 WET isdst=0 gmtoff=0

Philip Ross (phil-ross)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.