OSDN Git Service

Addition of a new system file for time zone data
authorNeil Fuller <nfuller@google.com>
Thu, 30 Mar 2017 17:12:49 +0000 (18:12 +0100)
committerNeil Fuller <nfuller@google.com>
Fri, 31 Mar 2017 14:35:14 +0000 (15:35 +0100)
commit108279e9e5be02b15c8000d99ce2e600c0bc97ec
tree0918ddf1974aae2957674f988fe40f9abe6c20cf
parent840ae69408c9b6ca269bce4657b9696cc6720918
Addition of a new system file for time zone data

This file is to replace the time_zones_by_country.xml
file from frameworks/base/core/res/res/xml/

This new file is intended to be updated outside of
an OTA, unlike time_zones_by_country.xml.

The tzlookup.xml file is read by code in libcore, not
frameworks/base.

The format of the file is slightly different from
time_zones_by_country.xml but the information is the
same as the current version. It was generated using
a sed transform and manual coallescing of the
<country> elements / comments:

sed 's/<timezones>$/<timezones>\n  <countryzones>/' frameworks/base/core/res/res/xml/time_zones_by_country.xml \
    | sed 's/<\/timezones>/  <\/countryzones>\n<\/timezones>/' \
    | sed 's/<timezone\( code=\"..\">\)/<country\1\n      <id>/g' \
    | sed 's/<\/timezone>/<\/id>\n    <\/country>/g'

The time_zones_by_country.xml file will be deleted
in a follow up change when the new code is wired into
the code that uses this data.

Test: See associated libcore change that will ensure the file
      is kept in sync with tzdata when applying IANA rules
      changes.
Bug: 25338903
Change-Id: I8912307bf6a41750ac06ffce9143e8055ea4e7c5
libc/zoneinfo/Android.mk
libc/zoneinfo/tzlookup.xml [new file with mode: 0644]