r2128 - tzdata/trunk/debian
Author: aurel32
Date: 2007-04-25 13:27:13 +0000 (Wed, 25 Apr 2007)
New Revision: 2128
Modified:
tzdata/trunk/debian/changelog
tzdata/trunk/debian/config
Log:
* Convert old or single-level timezones into two-level timezones
(closes: bug#420895).
Modified: tzdata/trunk/debian/changelog
===================================================================
--- tzdata/trunk/debian/changelog 2007-04-25 00:43:50 UTC (rev 2127)
+++ tzdata/trunk/debian/changelog 2007-04-25 13:27:13 UTC (rev 2128)
@@ -1,3 +1,10 @@
+tzdata (2007e-5) unstable; urgency=low
+
+ * Convert old or single-level timezones into two-level timezones
+ (closes: bug#420895).
+
+ -- Aurelien Jarno <aurel32@debian.org> Wed, 25 Apr 2007 09:25:46 -0400
+
tzdata (2007e-4) unstable; urgency=low
* Don't ask debconf questions during the first upgrade if the timezone
Modified: tzdata/trunk/debian/config
===================================================================
--- tzdata/trunk/debian/config 2007-04-25 00:43:50 UTC (rev 2127)
+++ tzdata/trunk/debian/config 2007-04-25 13:27:13 UTC (rev 2128)
@@ -1,13 +1,254 @@
-#! /bin/sh
+#! /bin/sh -x
set -e
. /usr/share/debconf/confmodule
db_version 2.0
db_capb backup
+convert_timezone()
+{
+ case "$1" in
+ "Brazil/Acre")
+ echo "America/Rio_Branco"
+ ;;
+ "Brazil/DeNoronha")
+ echo "America/Noronha"
+ ;;
+ "Brazil/East")
+ echo "America/Sao_Paulo"
+ ;;
+ "Brazil/West")
+ echo "America/Manaus"
+ ;;
+ "Canada/Atlantic")
+ echo "America/Halifax"
+ ;;
+ "Canada/Central")
+ echo "America/Winnipeg"
+ ;;
+ "Canada/East-Saskatchewan")
+ echo "America/Regina"
+ ;;
+ "Canada/Eastern")
+ echo "America/Toronto"
+ ;;
+ "Canada/Mountain")
+ echo "America/Edmonton"
+ ;;
+ "Canada/Newfoundland")
+ echo "America/St_Johns"
+ ;;
+ "Canada/Pacific")
+ echo "America/Vancouver"
+ ;;
+ "Canada/Saskatchewan")
+ echo "America/Regina"
+ ;;
+ "Canada/Yukon")
+ echo "America/Whitehorse"
+ ;;
+ "CET")
+ echo "Europe/Paris"
+ ;;
+ "Chile/Continental")
+ echo "America/Santiago"
+ ;;
+ "Chile/EasterIsland")
+ echo "Pacific/Easter"
+ ;;
+ "CST6CDT")
+ echo "SystemV/CST6CDT"
+ ;;
+ "Cuba")
+ echo "America/Havana"
+ ;;
+ "EET")
+ echo "Europe/Helsinki"
+ ;;
+ "Egypt")
+ echo "Africa/Cairo"
+ ;;
+ "Eire")
+ echo "Europe/Dublin"
+ ;;
+ "EST")
+ echo "SystemV/EST5"
+ ;;
+ "EST5EDT")
+ echo "SystemV/EST5EDT"
+ ;;
+ "GB")
+ echo "Europe/London"
+ ;;
+ "GB-Eire")
+ echo "Europe/London"
+ ;;
+ "GMT")
+ echo "Etc/GMT"
+ ;;
+ "GMT0")
+ echo "Etc/GMT0"
+ ;;
+ "GMT-0")
+ echo "Etc/GMT-0"
+ ;;
+ "GMT+0")
+ echo "Etc/GMT+0"
+ ;;
+ "Greenwich")
+ echo "Etc/Greenwich"
+ ;;
+ "Hongkong")
+ echo "Asia/Hong_Kong"
+ ;;
+ "HST")
+ echo "Pacific/Honolulu"
+ ;;
+ "Iceland")
+ echo "Atlantic/Reykjavik"
+ ;;
+ "Iran")
+ echo "Asia/Tehran"
+ ;;
+ "Israel")
+ echo "Asia/Tel_Aviv"
+ ;;
+ "Jamaica")
+ echo "America/Jamaica"
+ ;;
+ "Japan")
+ echo "Asia/Tokyo"
+ ;;
+ "Kwajalein")
+ echo "Pacific/Kwajalein"
+ ;;
+ "Libya")
+ echo "Africa/Tripoli"
+ ;;
+ "MET")
+ echo "Europe/Paris"
+ ;;
+ "Mexico/BajaNorte")
+ echo "America/Tijuana"
+ ;;
+ "Mexico/BajaSur")
+ echo "America/Mazatlan"
+ ;;
+ "Mexico/General")
+ echo "America/Mexico_City"
+ ;;
+ "Mideast/Riyadh87")
+ echo "Asia/Riyadh87"
+ ;;
+ "Mideast/Riyadh88")
+ echo "Asia/Riyadh88"
+ ;;
+ "Mideast/Riyadh89")
+ echo "Asia/Riyadh89"
+ ;;
+ "MST")
+ echo "SystemV/MST7"
+ ;;
+ "MST7MDT")
+ echo "SystemV/MST7MDT"
+ ;;
+ "Navajo")
+ echo "America/Denver"
+ ;;
+ "NZ")
+ echo "Pacific/Auckland"
+ ;;
+ "NZ-CHAT")
+ echo "Pacific/Chatham"
+ ;;
+ "Poland")
+ echo "Europe/Warsaw"
+ ;;
+ "Portugal")
+ echo "Europe/Lisbon"
+ ;;
+ "PRC")
+ echo "Asia/Shanghai"
+ ;;
+ "PST8PDT")
+ echo "SystemV/PST8PDT"
+ ;;
+ "ROC")
+ echo "Asia/Taipei"
+ ;;
+ "ROK")
+ echo "Asia/Seoul"
+ ;;
+ "Singapore")
+ echo "Asia/Singapore"
+ ;;
+ "Turkey")
+ echo "Europe/Istanbul"
+ ;;
+ "UCT")
+ echo "Etc/UCT"
+ ;;
+ "Universal")
+ echo "Etc/UTC"
+ ;;
+ "US/Alaska")
+ echo "America/Anchorage"
+ ;;
+ "US/Aleutian")
+ echo "America/Adak"
+ ;;
+ "US/Arizona")
+ echo "America/Phoenix"
+ ;;
+ "US/Central")
+ echo "America/Chicago"
+ ;;
+ "US/East-Indiana")
+ echo "America/Indianapolis"
+ ;;
+ "US/Eastern")
+ echo "America/New_York"
+ ;;
+ "US/Hawaii")
+ echo "Pacific/Honolulu"
+ ;;
+ "US/Indiana-Starke")
+ echo "America/Indianapolis"
+ ;;
+ "US/Michigan")
+ echo "America/Detroit"
+ ;;
+ "US/Mountain")
+ echo "America/Denver"
+ ;;
+ "US/Pacific")
+ echo "America/Los_Angeles"
+ ;;
+ "US/Samoa")
+ echo "Pacific/Pago_Pago"
+ ;;
+ "UTC")
+ echo "Etc/UTC"
+ ;;
+ "WET")
+ echo "Europe/Lisbon"
+ ;;
+ "W-SU")
+ echo "Europe/Moscow"
+ ;;
+ "Zulu")
+ echo "Etc/UTC"
+ ;;
+ *)
+ echo "$1"
+ ;;
+ esac
+}
+
# Read /etc/timezone
if [ -e /etc/timezone ] ; then
- TZ_TIMEZONE=$(head -n 1 /etc/timezone | sed -e "s/ .*//")
+ TZ_TIMEZONE="$(head -n 1 /etc/timezone | sed -e "s/ .*//")"
+ TZ_TIMEZONE="$(convert_timezone $TZ_TIMEZONE)"
if ! [ -f "/usr/share/zoneinfo/$TZ_TIMEZONE" ] ; then
TZ_TIMEZONE=""
fi
@@ -15,7 +256,8 @@
# Read /etc/localtime
if [ -L /etc/localtime ] ; then
- TZ_LOCALTIME=$(readlink /etc/localtime | sed 's%^/usr/share/zoneinfo/%%')
+ TZ_LOCALTIME="$(readlink /etc/localtime | sed 's%^/usr/share/zoneinfo/%%')"
+ TZ_LOCALTIME="$(convert_timezone $TZ_LOCALTIME)"
elif [ -f /etc/localtime ] && [ -n "$TZ_TIMEZONE" ] ; then
if cmp -s /etc/localtime /usr/share/zoneinfo/$TZ_TIMEZONE ; then
TZ_LOCALTIME=$TZ_TIMEZONE
@@ -25,8 +267,8 @@
# The timezone has never been configured or is falsely configured
if ! [ -e /etc/localtime ] ; then
if [ -n "$TZ_TIMEZONE" ] ; then
- AREA=$(echo $TZ_TIMEZONE | sed 's%/.*$%%')
- ZONE=$(echo $TZ_TIMEZONE | sed 's%^.*/%%')
+ AREA="$(echo $TZ_TIMEZONE | sed 's%/.*$%%')"
+ ZONE="$(echo $TZ_TIMEZONE | sed 's%^.*/%%')"
else
AREA="Etc"
ZONE="UTC"
@@ -44,8 +286,8 @@
fi
# The timezone has already been configured
else
- AREA=$(echo $TZ_LOCALTIME | sed 's%/.*$%%')
- ZONE=$(echo $TZ_LOCALTIME | sed 's%^.*/%%')
+ AREA="$(echo $TZ_LOCALTIME | sed 's%/.*$%%')"
+ ZONE="$(echo $TZ_LOCALTIME | sed 's%^.*/%%')"
# Don't ask the user, except if he/she explicitely asked that
if [ "$1" != "reconfigure" ] && [ -z "$DEBCONF_RECONFIGURE" ] ; then
db_fset tzdata/Areas seen true
Reply to: