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

Bug#552110: tzdata: 2009o breaks DST in Bangladesh



Package: tzdata
Severity: important
Version: 2009o-1
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch karmic

Hello,

In https://launchpad.net/bugs/456322 it was reported that 2009o breaks
DST in Bangladesh:

$ zdump -v -c 2007,2015 Asia/Dhaka
Asia/Dhaka Fri Jun 19 16:59:59 2009 UTC = Fri Jun 19 22:59:59 2009 BDT isdst=0 gmtoff=21600
Asia/Dhaka Fri Jun 19 17:00:00 2009 UTC = Fri Jun 19 23:00:00 2009 BDST isdst=0 gmtoff=21600

So DST is not considered at all, and clocks are off by an hour:

$ LANG= date -u; LANG= TZ=Asia/Dhaka date
Fri Oct 23 12:30:57 UTC 2009
Fri Oct 23 18:30:57 BDST 2009

This is due to our glibc not understanding open end dates on DST
rules. This already happened when Bangladesh DST was introduced the
first time (https://launchpad.net/bugs/383444) and back then it was
discussed with upstream, who proposed to patch it to set an arbitrary
end date.

I did that for Ubuntu now by setting an arbitrary end date to Jan 1 2100
so that it works now:

$ zdump -v -c 2007,2101 Asia/Dhaka
Asia/Dhaka  Fri Jun 19 16:59:59 2009 UTC = Fri Jun 19 22:59:59 2009 BDT isdst=0 gmtoff=21600
Asia/Dhaka  Fri Jun 19 17:00:00 2009 UTC = Sat Jun 20 00:00:00 2009 BDST isdst=1 gmtoff=25200
Asia/Dhaka  Thu Dec 31 16:59:59 2099 UTC = Thu Dec 31 23:59:59 2099 BDST isdst=1 gmtoff=25200
Asia/Dhaka  Thu Dec 31 17:00:00 2099 UTC = Thu Dec 31 23:00:00 2099 BDT isdst=0 gmtoff=21600

$ LANG= date -u; LANG= TZ=Asia/Dhaka date
Fri Oct 23 12:32:53 UTC 2009
Fri Oct 23 19:32:53 BDST 2009

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -u tzdata-2009o/debian/changelog tzdata-2009o/debian/changelog
--- tzdata-2009o/debian/changelog
+++ tzdata-2009o/debian/changelog
@@ -1,3 +1,11 @@
+tzdata (2009o-1ubuntu1) karmic; urgency=low
+
+  * Add bdst-workaround.diff: Work around glibc not being able to cope with
+    open end dates by specifying an arbitrary one far in the future. This
+    fixes time Bangladesh, which has eternal DST now. (LP: #456322)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Fri, 23 Oct 2009 14:00:01 +0200
+
 tzdata (2009o-1) unstable; urgency=low
 
   * New upstream release.
diff -u tzdata-2009o/debian/patches/series tzdata-2009o/debian/patches/series
--- tzdata-2009o/debian/patches/series
+++ tzdata-2009o/debian/patches/series
@@ -2,2 +2,3 @@
 java.diff -p1
+bdst-workaround.diff
 argentinas-dst-2009.diff -p1
only in patch2:
unchanged:
--- tzdata-2009o.orig/debian/patches/bdst-workaround.diff
+++ tzdata-2009o/debian/patches/bdst-workaround.diff
@@ -0,0 +1,16 @@
+# Description: Work around glibc not being able to cope with open end dates by specifying an arbitrary one far in the future.
+# Ubuntu: https://launchpad.net/bugs/456322, https://launchpad.net/bugs/383444
+Index: tzdata-2009o/asia
+===================================================================
+--- tzdata-2009o.orig/asia	2009-10-14 22:49:38.000000000 +0200
++++ tzdata-2009o/asia	2009-10-23 14:12:07.000000000 +0200
+@@ -205,7 +205,8 @@
+ 			6:30	-	BURT	1951 Sep 30
+ 			6:00	-	DACT	1971 Mar 26 # Dacca Time
+ 			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
+-			6:00	1:00	BDST
++			6:00	1:00	BDST	2100 Jan 1 # arbitrary end date; unspecified end date does not work with glibc
++			6:00	-	BDT
+ 
+ # Bhutan
+ # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Attachment: signature.asc
Description: Digital signature


Reply to: