Update the zic version used when generating tzdata
Historically, Android has used zic 2014b (or before)
to generate the tzdata file used by libcore's ZoneInfo
and bionic's mktime / localtime, etc.
Originally the version used was implicit and was based
on the zic version available on the developer's machine.
The version to be used was made explicit for consistency
in commit cdf5695c2b83e2781c287d8d315eb903554940da.
This change upgrades the tools version to the most
recent available at the time of writing and also modifies
/ renames the download-iana-data.py script so it can also
download the files needed for building zic.
There are associated changes in platform/libcore to handle
the test changes associated with the zic upgrade.
Bug: 73719425
Test: Manual execution of download-iana-files.py with missing and
old files
Test: run cts -m CtsLibcoreTestCases
Test: run cts -m CtsBionicTestCases
Change-Id: Ic11af7e586e4dc3597745dcaccf57cf8cb6e082a
diff --git a/download-iana-data.py b/download-iana-data.py
deleted file mode 100755
index 6b9865b..0000000
--- a/download-iana-data.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/python -B
-
-# Copyright 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""Downloads the latest IANA timezone data."""
-
-import ftplib
-import os
-import shutil
-import subprocess
-import sys
-
-sys.path.append('%s/external/icu/tools' % os.environ.get('ANDROID_BUILD_TOP'))
-import i18nutil
-import tzdatautil
-
-# Calculate the paths that are referred to by multiple functions.
-android_build_top = i18nutil.GetAndroidRootOrDie()
-iana_data_dir = os.path.realpath('%s/system/timezone/input_data/iana' % android_build_top)
-
-def FtpRetrieveFile(ftp, filename):
- ftp.retrbinary('RETR %s' % filename, open(filename, 'wb').write)
-
-def CheckSignature(data_filename, signature_filename):
- """Checks the signature of a file."""
- print 'Verifying signature...'
- try:
- subprocess.check_call(['gpg', '--trusted-key=ED97E90E62AA7E34', '--verify',
- signature_filename, data_filename])
- except subprocess.CalledProcessError as err:
- print 'Unable to verify signature'
- print '\n\n******'
- print 'If this fails for you, you probably need to import Paul Eggert''s public key:'
- print ' gpg --receive-keys ED97E90E62AA7E34'
- print '******\n\n'
- raise
-
-# Run with no arguments from any directory, with no special setup required.
-# See http://www.iana.org/time-zones/ for more about the source of this data.
-def main():
- print 'Looking for new IANA tzdata...'
-
- iana_tar_filenames = []
-
- ftp = ftplib.FTP('ftp.iana.org')
- ftp.login()
- ftp.cwd('tz/releases')
- for filename in ftp.nlst():
- if "/" in filename:
- print "FTP server returned bogus file name"
- sys.exit(1)
-
- if filename.startswith('tzdata20') and filename.endswith('.tar.gz'):
- iana_tar_filenames.append(filename)
- iana_tar_filenames.sort(reverse=True)
-
- if len(iana_tar_filenames) == 0:
- print 'No tzdata files found'
- sys.exit(1)
-
- latest_iana_tar_filename = iana_tar_filenames[0]
-
- local_iana_tar_file = tzdatautil.GetIanaTarFile(iana_data_dir, 'data')
-
- if local_iana_tar_file:
- local_iana_tar_filename = os.path.basename(local_iana_tar_file)
- if latest_iana_tar_filename <= local_iana_tar_filename:
- print 'Available data %s is older or the same as current data %s' % (latest_iana_tar_filename, local_iana_tar_filename)
- sys.exit(0)
-
- print 'Found new tzdata: %s' % latest_iana_tar_filename
- i18nutil.SwitchToNewTemporaryDirectory()
-
- print 'Downloading data (%s)...' % latest_iana_tar_filename
- FtpRetrieveFile(ftp, latest_iana_tar_filename)
-
- signature_filename = '%s.asc' % latest_iana_tar_filename
- print 'Downloading signature (%s)...' % signature_filename
- FtpRetrieveFile(ftp, signature_filename)
-
- CheckSignature(latest_iana_tar_filename, signature_filename)
-
- new_local_iana_tar_file = '%s/%s' % (iana_data_dir, latest_iana_tar_filename)
- shutil.copyfile(latest_iana_tar_filename, new_local_iana_tar_file)
- new_local_signature_file = '%s/%s' % (iana_data_dir, signature_filename)
- shutil.copyfile(signature_filename, new_local_signature_file)
-
- # Delete the existing local IANA tar file, if there is one.
- if local_iana_tar_file:
- os.remove(local_iana_tar_file)
-
- local_signature_file = '%s.asc' % local_iana_tar_file
- if os.path.exists(local_signature_file):
- os.remove(local_signature_file)
-
- print 'Look in %s for new IANA data files' % new_local_iana_tar_file
- sys.exit(0)
-
-
-if __name__ == '__main__':
- main()
diff --git a/download-iana-files.py b/download-iana-files.py
new file mode 100755
index 0000000..28fd1ea
--- /dev/null
+++ b/download-iana-files.py
@@ -0,0 +1,156 @@
+#!/usr/bin/python -B
+
+# Copyright 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Downloads the latest IANA timezone data."""
+
+import argparse
+import ftplib
+import os
+import shutil
+import subprocess
+import sys
+
+sys.path.append('%s/external/icu/tools' % os.environ.get('ANDROID_BUILD_TOP'))
+import i18nutil
+import tzdatautil
+
+# Calculate the paths that are referred to by multiple functions.
+android_build_top = i18nutil.GetAndroidRootOrDie()
+iana_data_dir = os.path.realpath('%s/system/timezone/input_data/iana' % android_build_top)
+iana_tools_dir = os.path.realpath('%s/system/timezone/input_tools/iana' % android_build_top)
+
+def FtpRetrieveFile(ftp, filename):
+ ftp.retrbinary('RETR %s' % filename, open(filename, 'wb').write)
+
+
+def CheckSignature(data_filename, signature_filename):
+ """Checks the signature of a file."""
+ print 'Verifying signature of %s using %s...' % (data_filename, signature_filename)
+ try:
+ subprocess.check_call(['gpg', '--trusted-key=ED97E90E62AA7E34', '--verify',
+ signature_filename, data_filename])
+ except subprocess.CalledProcessError as err:
+ print 'Unable to verify signature'
+ print '\n\n******'
+ print 'If this fails for you, you probably need to import Paul Eggert''s public key:'
+ print ' gpg --receive-keys ED97E90E62AA7E34'
+ print '******\n\n'
+ raise
+
+
+def FindLatestRemoteTar(ftp, file_prefix):
+ iana_tar_filenames = []
+
+ for filename in ftp.nlst():
+ if "/" in filename:
+ print "FTP server returned bogus file name"
+ sys.exit(1)
+
+ if filename.startswith(file_prefix) and filename.endswith('.tar.gz'):
+ iana_tar_filenames.append(filename)
+
+ iana_tar_filenames.sort(reverse=True)
+
+ if len(iana_tar_filenames) == 0:
+ print 'No files found'
+ sys.exit(1)
+
+ return iana_tar_filenames[0]
+
+
+def DownloadAndReplaceLocalFiles(file_prefixes, ftp, local_dir):
+ output_files = []
+
+ for file_prefix in file_prefixes:
+ latest_iana_tar_filename = FindLatestRemoteTar(ftp, file_prefix)
+ local_iana_tar_file = tzdatautil.GetIanaTarFile(local_dir, file_prefix)
+ if local_iana_tar_file:
+ local_iana_tar_filename = os.path.basename(local_iana_tar_file)
+ if latest_iana_tar_filename <= local_iana_tar_filename:
+ print('Latest remote file for %s is called %s and is older or the same as'
+ ' current local file %s'
+ % (local_dir, latest_iana_tar_filename, local_iana_tar_filename))
+ continue
+
+ print 'Found new %s* file for %s: %s' % (file_prefix, local_dir, latest_iana_tar_filename)
+ i18nutil.SwitchToNewTemporaryDirectory()
+
+ print 'Downloading file %s...' % latest_iana_tar_filename
+ FtpRetrieveFile(ftp, latest_iana_tar_filename)
+
+ signature_filename = '%s.asc' % latest_iana_tar_filename
+ print 'Downloading signature %s...' % signature_filename
+ FtpRetrieveFile(ftp, signature_filename)
+
+ CheckSignature(latest_iana_tar_filename, signature_filename)
+
+ new_local_iana_tar_file = '%s/%s' % (local_dir, latest_iana_tar_filename)
+ shutil.copyfile(latest_iana_tar_filename, new_local_iana_tar_file)
+ new_local_signature_file = '%s/%s' % (local_dir, signature_filename)
+ shutil.copyfile(signature_filename, new_local_signature_file)
+
+ output_files.append(new_local_iana_tar_file)
+ output_files.append(new_local_signature_file)
+
+ # Delete the existing local IANA tar file, if there is one.
+ if local_iana_tar_file:
+ os.remove(local_iana_tar_file)
+
+ local_signature_file = '%s.asc' % local_iana_tar_file
+ if os.path.exists(local_signature_file):
+ os.remove(local_signature_file)
+
+ return output_files
+
+# Run from any directory after having run source/envsetup.sh / lunch
+# See http://www.iana.org/time-zones/ for more about the source of this data.
+def main():
+ parser = argparse.ArgumentParser(description=('Update IANA files from upstream'))
+ parser.add_argument('--notools', help='Skip tools files', action='store_true')
+ parser.add_argument('--nodata', help='Skip data files', action='store_true')
+ args = parser.parse_args()
+ if args.notools and args.nodata:
+ parser.error("Nothing to do")
+ sys.exit(1)
+
+ print 'Looking for new IANA files...'
+
+ ftp = ftplib.FTP('ftp.iana.org')
+ ftp.login()
+ ftp.cwd('tz/releases')
+
+ output_files = []
+ if not args.notools:
+ # The tools and data files are kept separate to make the updates independent.
+ # This means we duplicate the tzdata20xx file (once in the tools dir, once
+ # in the data dir) but the contents of the data tar appear to be needed for
+ # the zic build.
+ new_files = DownloadAndReplaceLocalFiles(['tzdata20', 'tzcode20'], ftp, iana_tools_dir)
+ output_files += new_files
+ if not args.nodata:
+ new_files = DownloadAndReplaceLocalFiles(['tzdata20'], ftp, iana_data_dir)
+ output_files += new_files
+
+ if len(output_files) == 0:
+ print 'No files updated'
+ else:
+ print 'New files:'
+ for output_file in output_files:
+ print ' %s' % output_file
+
+
+if __name__ == '__main__':
+ main()
diff --git a/input_tools/iana/tzcode2014b.tar.gz b/input_tools/iana/tzcode2014b.tar.gz
deleted file mode 100644
index 8e48396..0000000
--- a/input_tools/iana/tzcode2014b.tar.gz
+++ /dev/null
Binary files differ
diff --git a/input_tools/iana/tzcode2014b.tar.gz.asc b/input_tools/iana/tzcode2014b.tar.gz.asc
deleted file mode 100644
index 9cb7108..0000000
--- a/input_tools/iana/tzcode2014b.tar.gz.asc
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.14 (GNU/Linux)
-
-iQIcBAABAgAGBQJTMQbFAAoJEO2X6Q5iqn40MmQP/jLFMoyIrHEHptt7gTxOiakP
-u+U2qhynw/tXQb44I+YgpYw54UPiZ7mGqQ9phGbmjcTsFT6vG9qO61LEMg9Y6nyr
-wu+qHYyKfqcLednTUFztR3x2aj4HWNVpMENXyoU+ZvVUw/Hd7J2uaNkw3n+zZYqY
-tZjMAkn7wPLVv2BGQPshkGQB7S5YEVdHcXyeey9mtS1TBCkPadldgSk6afsc7x89
-lTiQ5v89dNJPfOqjRbyIBbS6I26XTxOlEQzuHdzWz5p1m1SUqznosEKw5Mnat5qe
-LNo3HnmwJyXXXrJDsgYja3yH3Ie4Bhs+y1kjJfwrArnQaex9UWmetHEKuJrz5VY1
-HZadsNfVoBb4QYyZQiLxr/iqs/ZiTocX6xAdZpHdI5WSoUABfKLTgU67z1UFFVgd
-qEi335xK3/l6rFAOjwEzqEriugthSWU1SlqGCUAmP6c87gBgFFC+mMW/T1FnmZtn
-v/ST9L2xmeyS8a1693fnak1fATlTaF2j/JbrhqbhOFTim/k+u6LgXBpSZyuzs80/
-gnLjGN5gAD7OhAMkjU1Ty5T3F1cGGev3kGgWX093JXugj4DszwUzzgG/NZniFkQc
-t+7B56jbxMTdFs+RB0YWfJ34QUbusAkWNprFyftPYMyF9PElKv6ngF+1XVFdq84Z
-jz7+k6FTz3hkU/Ru2s+4
-=+BVZ
------END PGP SIGNATURE-----
diff --git a/input_tools/iana/tzcode2018e.tar.gz b/input_tools/iana/tzcode2018e.tar.gz
new file mode 100644
index 0000000..f195047
--- /dev/null
+++ b/input_tools/iana/tzcode2018e.tar.gz
Binary files differ
diff --git a/input_tools/iana/tzcode2018e.tar.gz.asc b/input_tools/iana/tzcode2018e.tar.gz.asc
new file mode 100644
index 0000000..ebe5a70
--- /dev/null
+++ b/input_tools/iana/tzcode2018e.tar.gz.asc
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQIcBAABAgAGBQJa6V9nAAoJEO2X6Q5iqn40r+EQAJSt3ap8G8swYPzBg6TstckZ
+tOxrDcGlRu4km6jzIhHelOwj2Sxw8X/0JyRc09xbbXGE/mv35DrzKC8ijfazu9pg
+Mr4eOclfFGq8l48aRag86hR33k62K84Xdl0WrwVFVefhlsRel9i6lXnBFcmgHl/C
+vSwJXyrZ2DgvZH88B6j8qnYkw/BMbsTKLM1L/3EHxKZqq/TCHS19Z1XbbkF6mm/u
+73aHHmXEnpSVol+3aekEKuS+PSdc+loYaAMvibBJ34ci2bc1X1HkOPF30dRSTETW
+pVtKXp1qFtmHRR07I28l7/jEzmI+XPheCswhOKowWqKe59tA2CTiFnkhuBQUmoZS
+XDjKpcgvrad9RSES1aVAfVn2iCx78Inu0W8UIWZ/eiMOh0taQH3n7K1KBnLwCEKd
+rAB9ummGRK787XJEe2/xnH/h0lilU7Ye6EddNwuGf5Q3PlS9brDov66dnIUWi76L
+uPRTufummczt6XcA9YL0zEhwvAzjSSqQzoga7mXBKSIwakRoKXCIoux+EdQOWNOy
+/VUMH5NIkND+kRcRdqTXs93Whu7SCV14DKi5j1LL39YC8nqGi0q3u8wndm22AhCr
+ZR9uMv1Qq1iCXb09sIBfdi7bf0S8348jz1deb/d7jgJ4ISBR7v8UiR3Z/JO8hiPR
+QSP93j37rjAsFyBSWMxq
+=knlj
+-----END PGP SIGNATURE-----
diff --git a/input_tools/iana/tzdata2014b.tar.gz b/input_tools/iana/tzdata2014b.tar.gz
deleted file mode 100644
index 31fb9e8..0000000
--- a/input_tools/iana/tzdata2014b.tar.gz
+++ /dev/null
Binary files differ
diff --git a/input_tools/iana/tzdata2014b.tar.gz.asc b/input_tools/iana/tzdata2014b.tar.gz.asc
deleted file mode 100644
index c50a53a..0000000
--- a/input_tools/iana/tzdata2014b.tar.gz.asc
+++ /dev/null
@@ -1,17 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.14 (GNU/Linux)
-
-iQIcBAABAgAGBQJTMQbFAAoJEO2X6Q5iqn40o1gQAKrv5uiwH6nkf+vAG6u3P1e+
-RXdP+fC0IDOQoJFYf4i6gv1LPZ4A3uzwU9fZ8Fq4ETmCRr8UZmtRkrVTqNchfobV
-Kkkn3XlX5IlPqirBVL3/L3wVGybj7kfauhWozJuyvQuQCaF58TqNAqfV7joSZLZt
-8CwBYf1cnkuHkybLJjiur+s3nZ3nAhKa/6p1MbMJBMpeAWtAqdOWW3C/LIgvrX5n
-292hzn+0CILcsESxai6YOYpb3VwsVOilqdyBCos16Ra/qRwKUqhtUh+N+/0HdjUw
-E+wPh4n3mDVMSwiVi0yiZSMACU/mQmwI0W0lQAyGRtMjpK32R/VrwHUAZRAt/B8G
-0vOeGl5xXjuaPl46agkhBVhpUHX2ATLKmuJAwZ9jPUYkspqmT3ttzArXcfekFpeb
-xd6jlpQiqENeo8aZRSllTxE2zYJg5k6UvZ+NTMElh1AmRuUhh+kJq3SQnuEv2fqZ
-qEXuUZmdkMfLt3xF6OMDX1Uel/i6GFRfs+Lr7w6PV1HFVTiqZiOB5a1X3hn0dk8M
-cJQpwyhEfidZASQsKJADhMpUlon6i2O1jBJwyAWrMaCx38a2L6EX9jLPWyPRHze8
-v386Rk319AOWupf/G48pJt/LnYiFw1F1AtOct9cpUBDJFoopGuU8O9D3Z49Carsd
-CknX8ICVszv7uQpCvwO4
-=vlee
------END PGP SIGNATURE-----
diff --git a/input_tools/iana/tzdata2018e.tar.gz b/input_tools/iana/tzdata2018e.tar.gz
new file mode 100644
index 0000000..8955eea
--- /dev/null
+++ b/input_tools/iana/tzdata2018e.tar.gz
Binary files differ
diff --git a/input_tools/iana/tzdata2018e.tar.gz.asc b/input_tools/iana/tzdata2018e.tar.gz.asc
new file mode 100644
index 0000000..1450a6b
--- /dev/null
+++ b/input_tools/iana/tzdata2018e.tar.gz.asc
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1
+
+iQIcBAABAgAGBQJa6V9nAAoJEO2X6Q5iqn40qYUQAI21DF4x+Qr9uhMf5UL3u/UI
+BnLTeDqc4t1oLbuuJsbtgausc/m6EIgo2j9+uadXefnguP4fwKHJ2doReuRZ3njI
+hGnqP2+yCfTRNrZYBU3p6U+/OJq8r/UBsn9aGxNStcZHe6FswnxXWlzpRNbPdNBC
+nGeYMs2HOQjcdG08BF1sjGm4FC/NS6bugNhs0EcrMLaVa+c0keRWNg9o7Y/SvrZB
+awFAMz4LhOog2qxhGWtFgSVRAAj5aEDqugOXZL27VszgGPexiAaMCFyQARIHigIw
+959D7RYmpeNuEeP6XbzGFgDO6aMbxahoUpP9cCOUI6qKShtDKnY2XkjPmVQiAfjZ
+zvpsE1dYbWyVTWqWhWL3z0lPCFN6B4eneY6UXY/KtENRl1jEafKN5/7JqKOMBSRo
+umE1Jy6qSSz5jLuz5pX59iOXWZETIlwtAW6lKe2s6l9xWPL9R8xXoPvbQRadqDxB
+uANcGZSrKD1jKuybPJa/6BZRF+FlldCkZVVKSSdXuPLF1HhohlvFZqi1WPmWvGd+
+s/1+3OhWzB4BHyrp3Wbtj+ZwCtg9UVbJLBM2bgL9nGEyv/1XSxgLJEp3rneIMpJv
+AMK8rr3XehXLDkXAfx68Mzs3F4lYEdXk6y9f9ZsVj+IdBotwzzjJWeCfnlmJM52y
+8cCrPGUjdneFidV9OZ+J
+=4LFO
+-----END PGP SIGNATURE-----
diff --git a/output_data/distro/distro.zip b/output_data/distro/distro.zip
index c62d9a5..1c819fa 100644
--- a/output_data/distro/distro.zip
+++ b/output_data/distro/distro.zip
Binary files differ
diff --git a/output_data/iana/tzdata b/output_data/iana/tzdata
index 5c17a8b..2bdf3f7 100644
--- a/output_data/iana/tzdata
+++ b/output_data/iana/tzdata
Binary files differ
diff --git a/testing/data/test1/output_data/distro/distro.zip b/testing/data/test1/output_data/distro/distro.zip
index 3532844..99273c3 100644
--- a/testing/data/test1/output_data/distro/distro.zip
+++ b/testing/data/test1/output_data/distro/distro.zip
Binary files differ
diff --git a/testing/data/test1/output_data/iana/tzdata b/testing/data/test1/output_data/iana/tzdata
index 95236a9..d8318f1 100644
--- a/testing/data/test1/output_data/iana/tzdata
+++ b/testing/data/test1/output_data/iana/tzdata
Binary files differ
diff --git a/testing/data/test2/output_data/distro/distro.zip b/testing/data/test2/output_data/distro/distro.zip
index ea6b02e..96ec205 100644
--- a/testing/data/test2/output_data/distro/distro.zip
+++ b/testing/data/test2/output_data/distro/distro.zip
Binary files differ
diff --git a/testing/data/test2/output_data/iana/tzdata b/testing/data/test2/output_data/iana/tzdata
index 393191b..ee1777d 100644
--- a/testing/data/test2/output_data/iana/tzdata
+++ b/testing/data/test2/output_data/iana/tzdata
Binary files differ
diff --git a/tzdatautil.py b/tzdatautil.py
index 839a9f4..e47e066 100644
--- a/tzdatautil.py
+++ b/tzdatautil.py
@@ -17,10 +17,10 @@
"""Shared functions for use in tzdata scripts."""
-def GetIanaTarFile(dir_name, file_type):
+def GetIanaTarFile(dir_name, file_prefix):
matching_files = []
for filename in os.listdir(dir_name):
- if filename.startswith('tz%s20' % file_type) and filename.endswith('.tar.gz'):
+ if filename.startswith(file_prefix) and filename.endswith('.tar.gz'):
matching_files.append(filename);
if len(matching_files) == 0:
@@ -28,6 +28,6 @@
elif len(matching_files) == 1:
return '%s/%s' % (dir_name, matching_files[0])
else:
- print 'Multiple tz%s files found unexpectedly %s' % (file_type, matching_files)
+ print 'Multiple %s files found unexpectedly %s' % (file_prefix, matching_files)
sys.exit(1)
diff --git a/update-tzdata.py b/update-tzdata.py
index 20986c7..73599be 100755
--- a/update-tzdata.py
+++ b/update-tzdata.py
@@ -116,9 +116,9 @@
def BuildZic(iana_tools_dir):
- iana_zic_code_tar_file = tzdatautil.GetIanaTarFile(iana_tools_dir, 'code')
+ iana_zic_code_tar_file = tzdatautil.GetIanaTarFile(iana_tools_dir, 'tzcode')
iana_zic_code_version = GetIanaVersion(iana_zic_code_tar_file)
- iana_zic_data_tar_file = tzdatautil.GetIanaTarFile(iana_tools_dir, 'data')
+ iana_zic_data_tar_file = tzdatautil.GetIanaTarFile(iana_tools_dir, 'tzdata')
iana_zic_data_version = GetIanaVersion(iana_zic_data_tar_file)
print 'Found IANA zic release %s/%s in %s/%s ...' \
@@ -221,7 +221,7 @@
print 'Output data file structure: %s' % timezone_output_data_dir
iana_input_data_dir = '%s/iana' % timezone_input_data_dir
- iana_data_tar_file = tzdatautil.GetIanaTarFile(iana_input_data_dir, 'data')
+ iana_data_tar_file = tzdatautil.GetIanaTarFile(iana_input_data_dir, 'tzdata')
iana_data_version = GetIanaVersion(iana_data_tar_file)
print 'IANA time zone data release %s in %s ...' % (iana_data_version, iana_data_tar_file)