Files
android_development/tools/zoneinfo/generate
Eric Fischer 1f9f586c83 Correct the raw offsets in the time zone index for a few zones.
ZoneCompactor was using the system time zone database to get the offsets
instead of using the data it was compiling, so for newly added or recently
changed zones the index could be inconsistent with the data.

Affected zones: San_Luis, Casey, Davis, Mawson, Kathmandu, Novokuznetsk
2009-11-23 16:45:09 -08:00

38 lines
825 B
Bash
Executable File

#!/bin/sh
version=tzdata2009s
mkdir data
for i in $version/africa \
$version/antarctica \
$version/asia \
$version/australasia \
$version/etcetera \
$version/europe \
$version/factory \
$version/northamerica \
$version/solar87 \
$version/solar88 \
$version/solar89 \
$version/southamerica
do
zic -d data $i
done
javac -target 1.5 ZoneCompactor.java ZoneInfo.java
(
cat $version/* | grep '^Link' | awk '{print $1, $2, $3}'
(
cat $version/* | grep '^Zone' | awk '{print $2}'
cat $version/* | grep '^Link' | awk '{print $3}'
) | LC_ALL="C" sort
) | grep -v Riyadh8 > setup
java ZoneCompactor setup data
cp zoneinfo.dat zoneinfo.idx ../../../bionic/libc/zoneinfo
echo $version | sed 's/tzdata//' > ../../../bionic/libc/zoneinfo/zoneinfo.version