X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4d9eefca008a7bc544144ef830fa144ce89deaa0..277af7082f210d5fa7e37ce63392ac8568371616:/icuSources/tools/tzcode/tz2icu.cpp diff --git a/icuSources/tools/tzcode/tz2icu.cpp b/icuSources/tools/tzcode/tz2icu.cpp index 6af3eb40..aeae5893 100644 --- a/icuSources/tools/tzcode/tz2icu.cpp +++ b/icuSources/tools/tzcode/tz2icu.cpp @@ -1,7 +1,7 @@ /* ********************************************************************** -* Copyright (c) 2003-2013, International Business Machines +* Copyright (c) 2003-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: Alan Liu @@ -304,9 +304,9 @@ void readzoneinfo(ifstream& file, ZoneInfo& info, bool is64bitData) { } // skip additional Olson byte version file.read(buf, 1); - // if '\0', we have just one copy of data, if '2', there is additional + // if '\0', we have just one copy of data, if '2' or '3', there is additional // 64 bit version at the end. - if(buf[0]!=0 && buf[0]!='2') { + if(buf[0]!=0 && buf[0]!='2' && buf[0]!='3') { throw invalid_argument("Bad Olson version info"); } @@ -742,7 +742,7 @@ struct FinalZone { << " and rule ID " << ruleid; throw invalid_argument(os.str()); } - if (year < 1900 || year >= 2050) { + if (year < 1900) { ostringstream os; os << "Invalid input year " << year << " with offset " << offset @@ -829,7 +829,7 @@ struct FinalRulePart { if (mode != DOM && (dow < 0 || dow >= 7)) { os << "Invalid input day of week " << dow; } - if (offset < 0 || offset > HOUR) { + if (offset < 0 || offset > (2 * HOUR)) { os << "Invalid input offset " << offset; } if (isgmt && !isstd) { @@ -1720,10 +1720,10 @@ int main(int argc, char *argv[]) { file << ", International Business Machines" << endl << "// Corporation and others. All Rights Reserved." << endl << "//---------------------------------------------------------" << endl - << "// Build tool: tz2icu" << endl - << "// Build date: " << asctime(now) /* << endl -- asctime emits CR */ - << "// Olson source: ftp://elsie.nci.nih.gov/pub/" << endl - << "// Olson version: " << version << endl + << "// Build tool: tz2icu" << endl + << "// Build date: " << asctime(now) /* << endl -- asctime emits CR */ + << "// tz database: ftp://ftp.iana.org/tz/" << endl + << "// tz version: " << version << endl << "// ICU version: " << U_ICU_VERSION << endl << "//---------------------------------------------------------" << endl << "// >> !!! >> THIS IS A MACHINE-GENERATED FILE << !!! <<" << endl