diff options
author | John Layt <jlayt@kde.org> | 2014-01-07 17:10:19 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-11 17:23:25 +0100 |
commit | 19be46414ae68c619b94f2fdebd21192898d65fd (patch) | |
tree | 1fbb1980d76bcecc997ddd6721a6870828f8343b /util | |
parent | 20a03d5612a5a7b763bfb0edbf9922ec4e50b25d (diff) | |
download | qtbase-19be46414ae68c619b94f2fdebd21192898d65fd.tar.gz |
QTimeZone - Change from Olson ID to IANA ID
Complete changes from using Olsen/Olson in the code to IANA. Completes
a change started in 5.2 release branch on the public occurrences.
Change-Id: Ib077fcda2c77eef6f04ec28901d8d2d7210b8c72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'util')
-rwxr-xr-x | util/local_database/cldr2qtimezone.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/local_database/cldr2qtimezone.py b/util/local_database/cldr2qtimezone.py index 4e3548a387..57655c3097 100755 --- a/util/local_database/cldr2qtimezone.py +++ b/util/local_database/cldr2qtimezone.py @@ -296,7 +296,7 @@ if mapTimezones: if attribute[0] == u'territory': data['countryCode'] = attribute[1] if attribute[0] == u'type': - data['olsenList'] = attribute[1] + data['ianaList'] = attribute[1] data['windowsKey'] = windowsIdToKey(data['windowsId']) if data['windowsKey'] <= 0: @@ -304,7 +304,7 @@ if mapTimezones: countryId = 0 if data['countryCode'] == u'001': - defaultDict[data['windowsKey']] = data['olsenList'] + defaultDict[data['windowsKey']] = data['ianaList'] else: data['countryId'] = enumdata.countryCodeToId(data['countryCode']) if data['countryId'] < 0: @@ -342,17 +342,17 @@ newTempFile.write("\n\ */\n\n" % (str(datetime.date.today()), versionNumber, generationDate) ) windowsIdData = ByteArrayData() -olsenIdData = ByteArrayData() +ianaIdData = ByteArrayData() -# Write Windows/Olsen table -newTempFile.write("// Windows ID Key, Country Enum, Olsen ID Index\n") +# Write Windows/IANA table +newTempFile.write("// Windows ID Key, Country Enum, IANA ID Index\n") newTempFile.write("static const QZoneData zoneDataTable[] = {\n") for index in windowsIdDict: data = windowsIdDict[index] newTempFile.write(" { %6d,%6d,%6d }, // %s / %s\n" \ % (data['windowsKey'], data['countryId'], - olsenIdData.append(data['olsenList']), + ianaIdData.append(data['ianaList']), data['windowsId'], data['country'])) newTempFile.write(" { 0, 0, 0 } // Trailing zeroes\n") @@ -361,13 +361,13 @@ newTempFile.write("};\n\n") print "Done Zone Data" # Write Windows ID key table -newTempFile.write("// Windows ID Key, Windows ID Index, Olsen ID Index, UTC Offset\n") +newTempFile.write("// Windows ID Key, Windows ID Index, IANA ID Index, UTC Offset\n") newTempFile.write("static const QWindowsData windowsDataTable[] = {\n") for windowsKey in windowsIdList: newTempFile.write(" { %6d,%6d,%6d,%6d }, // %s\n" \ % (windowsKey, windowsIdData.append(windowsIdList[windowsKey][0]), - olsenIdData.append(defaultDict[windowsKey]), + ianaIdData.append(defaultDict[windowsKey]), windowsIdList[windowsKey][1], windowsIdList[windowsKey][0])) newTempFile.write(" { 0, 0, 0, 0 } // Trailing zeroes\n") @@ -376,12 +376,12 @@ newTempFile.write("};\n\n") print "Done Windows Data Table" # Write UTC ID key table -newTempFile.write("// Olsen ID Index, UTC Offset\n") +newTempFile.write("// IANA ID Index, UTC Offset\n") newTempFile.write("static const QUtcData utcDataTable[] = {\n") for index in utcIdList: data = utcIdList[index] newTempFile.write(" { %6d,%6d }, // %s\n" \ - % (olsenIdData.append(data[0]), + % (ianaIdData.append(data[0]), data[1], data[0])) newTempFile.write(" { 0, 0 } // Trailing zeroes\n") @@ -394,9 +394,9 @@ newTempFile.write("static const char windowsIdData[] = {\n") newTempFile.write(wrap_list(windowsIdData.data)) newTempFile.write("\n};\n\n") -# Write out Olsen ID's data -newTempFile.write("static const char olsenIdData[] = {\n") -newTempFile.write(wrap_list(olsenIdData.data)) +# Write out IANA ID's data +newTempFile.write("static const char ianaIdData[] = {\n") +newTempFile.write(wrap_list(ianaIdData.data)) newTempFile.write("\n};\n") print "Done ID Data Table" |