this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ts v3

alice 2284fea1 15a81486

+354 -224
+9 -1
scripts/bun.lock
··· 5 5 "name": "tidface-scripts", 6 6 "dependencies": { 7 7 "@types/commander": "^2.12.5", 8 - "@vvo/tzdb": "^6", 8 + "@vvo/tzdb": "^6.161.0", 9 9 "airport-data": "^1.0.1", 10 10 "cheerio": "^1", 11 11 "commander": "^13.1.0", 12 12 "csv-parse": "^5", 13 13 "geo-tz": "^8", 14 14 "luxon": "^3", 15 + "timezonecomplete": "^5.13.1", 16 + "tzdata": "^1.0.44", 15 17 }, 16 18 "devDependencies": { 17 19 "@types/jest": "^29", ··· 641 643 642 644 "text-encoding": ["text-encoding@0.6.4", "", {}, "sha512-hJnc6Qg3dWoOMkqP53F0dzRIgtmsAge09kxUIqGrEUS4qr5rWLckGYaQAVr+opBrIMRErGgy6f5aPnyPpyGRfg=="], 643 645 646 + "timezonecomplete": ["timezonecomplete@5.13.1", "", { "dependencies": { "tzdata": "1.0.25" } }, "sha512-41o3TTExXQ03jQML12Tk64b5TYeEy968Umq5vya+08sFWCcYw5fNqrHubD1vj/JGN1NYhFFBCS09rOL3b7nM2w=="], 647 + 644 648 "tmpl": ["tmpl@1.0.5", "", {}, "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="], 645 649 646 650 "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], ··· 658 662 "typedarray": ["typedarray@0.0.6", "", {}, "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="], 659 663 660 664 "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="], 665 + 666 + "tzdata": ["tzdata@1.0.44", "", {}, "sha512-xJ8xcdoFRwFpIQ90QV3WFXJNCO/feNn9vHVsZMJiKmtMYuo7nvF6CTpBc+SgegC1fb/3L+m32ytXT9XrBjrINg=="], 661 667 662 668 "undici": ["undici@6.21.2", "", {}, "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g=="], 663 669 ··· 720 726 "parse5/entities": ["entities@6.0.0", "", {}, "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw=="], 721 727 722 728 "shapefile/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], 729 + 730 + "timezonecomplete/tzdata": ["tzdata@1.0.25", "", {}, "sha512-yAZ/Tv/tBFIPHJGYrOexxW8Swyjszt7rDhIjnIPSqLaP8mzrr3T7D0w4cxQBtToXnQrlFqkEU0stGC/auz0JcQ=="], 723 731 724 732 "wrap-ansi/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], 725 733
+164
scripts/generateTzList.test.ts
··· 1 + import os from 'os'; 2 + import path from 'path'; 3 + import fs from 'fs/promises'; 4 + import { DateTime } from 'luxon'; 5 + import { generateTzCCode } from './generateTzList'; 6 + import { findDstTransitions, DstTransitions } from './tzCommon'; // Import to get expected values 7 + 8 + jest.setTimeout(60000); // Keep generous timeout as it runs the full generation 9 + 10 + // Helper to parse the simple C array formats 11 + function parseCStringArray(cCode: string, arrayName: string): string[] { 12 + const startMarker = `static const char* ${arrayName}[] = {`; 13 + const endMarker = `};`; 14 + 15 + const startIndex = cCode.indexOf(startMarker); 16 + if (startIndex === -1) { 17 + console.error(`[TEST PARSE ERROR] Could not find start marker for C array: ${arrayName}`); 18 + return []; 19 + } 20 + 21 + const braceIndex = startIndex + startMarker.length; 22 + const endIndex = cCode.indexOf(endMarker, braceIndex); 23 + if (endIndex === -1) { 24 + console.error(`[TEST PARSE ERROR] Could not find end marker for C array: ${arrayName}`); 25 + return []; 26 + } 27 + 28 + const blockContent = cCode.slice(braceIndex, endIndex); 29 + const lines = blockContent.split('\n'); 30 + 31 + const results: string[] = []; 32 + lines.forEach((line, index) => { 33 + const trimmedLine = line.trim(); 34 + const lineMatch = trimmedLine.match(/^"(.*?)",?$/); 35 + if (lineMatch && lineMatch[1]) { 36 + results.push(lineMatch[1]); 37 + } 38 + }); 39 + return results; 40 + } 41 + 42 + interface ParsedTzInfo { 43 + stdHours: number; 44 + dstHours: number; 45 + startTs: number; 46 + endTs: number; 47 + nameOffset: number; 48 + nameCount: number; 49 + } 50 + 51 + function parseTzInfoArray(cCode: string): ParsedTzInfo[] { 52 + const startMarker = `static const TzInfo tz_list[] = {`; 53 + const endMarker = `};`; 54 + 55 + const startIndex = cCode.indexOf(startMarker); 56 + if (startIndex === -1) { 57 + console.error(`[TEST PARSE ERROR] Could not find start marker for TzInfo array`); 58 + return []; 59 + } 60 + 61 + const braceIndex = startIndex + startMarker.length; 62 + const endIndex = cCode.indexOf(endMarker, braceIndex); 63 + if (endIndex === -1) { 64 + console.error(`[TEST PARSE ERROR] Could not find end marker for TzInfo array`); 65 + return []; 66 + } 67 + 68 + const blockContent = cCode.slice(braceIndex, endIndex); 69 + const lines = blockContent.split('\n'); 70 + 71 + const result: ParsedTzInfo[] = []; 72 + const lineRegex = /\{\s*(-?\d+(?:\.\d+)?)f,\s*(-?\d+(?:\.\d+)?)f,\s*(\d+)LL,\s*(\d+)LL,\s*(\d+),\s*(\d+)\s*\},?/; // Allow integers or floats for offsets 73 + lines.forEach(line => { 74 + const lineMatch = line.trim().match(lineRegex); 75 + if (lineMatch) { 76 + result.push({ 77 + stdHours: parseFloat(lineMatch[1]), 78 + dstHours: parseFloat(lineMatch[2]), 79 + startTs: parseInt(lineMatch[3], 10), 80 + endTs: parseInt(lineMatch[4], 10), 81 + nameOffset: parseInt(lineMatch[5], 10), 82 + nameCount: parseInt(lineMatch[6], 10), 83 + }); 84 + } 85 + }); 86 + return result; 87 + } 88 + 89 + 90 + describe('generateTzList', () => { 91 + let generatedCCode: string; 92 + let namePool: string[]; 93 + let tzList: ParsedTzInfo[]; 94 + const currentYear = DateTime.utc().year; 95 + 96 + // Run generation once before all tests 97 + beforeAll(async () => { 98 + const out = path.join(os.tmpdir(), `tz_${Date.now()}.c`); 99 + await generateTzCCode(out); 100 + generatedCCode = await fs.readFile(out, 'utf-8'); 101 + namePool = parseCStringArray(generatedCCode, 'tz_name_pool'); 102 + tzList = parseTzInfoArray(generatedCCode); 103 + // Add a check to ensure parsing worked before tests run 104 + if (namePool.length === 0 || tzList.length === 0) { 105 + throw new Error('[TEST] Failed to parse generated C code in beforeAll hook.'); 106 + } 107 + }); 108 + 109 + // Test cases for specific zones 110 + const testCases: { zone: string; city: string }[] = [ 111 + { zone: 'America/New_York', city: 'New York' }, 112 + { zone: 'Asia/Tokyo', city: 'Tokyo' }, 113 + { zone: 'Pacific/Auckland', city: 'Auckland' }, 114 + { zone: 'Australia/Lord_Howe', city: 'Lord Howe' }, 115 + { zone: 'Europe/London', city: 'London' }, 116 + ]; 117 + 118 + test.each(testCases)('should generate correct entry for $city ($zone)', ({ zone, city }) => { 119 + const expectedTransitions = findDstTransitions(zone, currentYear); 120 + const expected: ParsedTzInfo = { 121 + stdHours: expectedTransitions[0] / 3600, 122 + dstHours: expectedTransitions[1] / 3600, 123 + startTs: expectedTransitions[2], 124 + endTs: expectedTransitions[3], 125 + nameOffset: -1, // Will be updated 126 + nameCount: -1, // Will be updated 127 + }; 128 + 129 + // 1. Find the city in the name pool 130 + const cityIndex = namePool.indexOf(city); 131 + expect(cityIndex).toBeGreaterThanOrEqual(0); // City must exist in the pool 132 + 133 + // 2. Find the bucket containing this city 134 + const bucket = tzList.find(entry => 135 + cityIndex >= entry.nameOffset && cityIndex < (entry.nameOffset + entry.nameCount) 136 + ); 137 + expect(bucket).toBeDefined(); // A bucket must contain this city 138 + 139 + // 3. Compare bucket details with expected values 140 + expect(bucket?.stdHours).toBeCloseTo(expected.stdHours, 2); 141 + expect(bucket?.dstHours).toBeCloseTo(expected.dstHours, 2); 142 + expect(bucket?.startTs).toBe(expected.startTs); 143 + expect(bucket?.endTs).toBe(expected.endTs); 144 + }); 145 + 146 + test('should contain the required macros', () => { 147 + expect(generatedCCode).toMatch(/#define TZ_LIST_COUNT/); 148 + expect(generatedCCode).toMatch(/#define TZ_NAME_POOL_COUNT/); 149 + }); 150 + 151 + test('TZ_LIST_COUNT macro should match parsed list length', () => { 152 + const match = generatedCCode.match(/#define\s+TZ_LIST_COUNT\s+\(sizeof\(tz_list\)\/sizeof\(tz_list\[0\]\)\)/); 153 + expect(match).not.toBeNull(); 154 + // Check the actual count directly from parsed data 155 + expect(tzList.length).toBeGreaterThan(10); // Keep a basic sanity check on count 156 + // We could potentially parse the value from the define if needed, but comparing to parsed length is good 157 + }); 158 + 159 + test('TZ_NAME_POOL_COUNT macro should match parsed name pool length', () => { 160 + const match = generatedCCode.match(/#define\s+TZ_NAME_POOL_COUNT\s+\(sizeof\(tz_name_pool\)\/sizeof\(tz_name_pool\[0\]\)\)/); 161 + expect(match).not.toBeNull(); 162 + expect(namePool.length).toBeGreaterThan(50); // Basic sanity check 163 + }); 164 + });
+102
scripts/generateTzList.ts
··· 1 + import { DateTime } from 'luxon'; 2 + import { rawTimeZones } from '@vvo/tzdb'; 3 + import * as fs from 'fs/promises'; 4 + import * as path from 'path'; 5 + import { program } from 'commander'; 6 + import { findDstTransitions } from './tzCommon'; 7 + 8 + interface TzBucket { 9 + std: number; 10 + dst: number; 11 + start: number; 12 + end: number; 13 + names: Set<string>; 14 + nameOffset?: number; 15 + nameCount?: number; 16 + } 17 + 18 + function getCityName(tz: string): string { 19 + const part = tz.split('/').pop() || tz; 20 + return part.replace(/_/g, ' '); 21 + } 22 + 23 + export async function generateTzCCode(outPath: string): Promise<void> { 24 + const year = DateTime.utc().year; 25 + console.log(`Generating tz_list for year ${year}`); 26 + 27 + const buckets = new Map<string, TzBucket>(); 28 + 29 + rawTimeZones.forEach(({ name }) => { 30 + if (!name.includes('/')) return; 31 + if (name.startsWith('Etc/')) return; 32 + if (/^(Factory|factory)/.test(name)) return; 33 + if (/^(right|posix)\//i.test(name)) return; 34 + 35 + const [std, dst, start, end] = findDstTransitions(name, year); 36 + const city = getCityName(name); 37 + if (!/^[A-Z]/.test(city)) return; 38 + 39 + const key = `${std}_${dst}_${start}_${end}`; 40 + let bucket = buckets.get(key); 41 + if (!bucket) { 42 + bucket = { std, dst, start, end, names: new Set() }; 43 + buckets.set(key, bucket); 44 + } 45 + bucket.names.add(city); 46 + }); 47 + 48 + const ordered = Array.from(buckets.values()).sort((a,b)=>{ 49 + if(a.std!==b.std) return a.std-b.std; 50 + if(a.dst!==b.dst) return a.dst-b.dst; 51 + if(a.start!==b.start) return a.start-b.start; 52 + return a.end-b.end; 53 + }); 54 + 55 + // Build flat name pool 56 + const namePool: string[] = []; 57 + ordered.forEach(b=>{ 58 + const names = Array.from(b.names).sort(); 59 + b.nameOffset = namePool.length; 60 + b.nameCount = names.length; 61 + namePool.push(...names); 62 + }); 63 + 64 + // Emit C code 65 + let c = ''; 66 + c += '// Auto-generated by generateTzList.ts\n'; 67 + c += `// Year ${year} DST data (Luxon / IANA)\n\n`; 68 + c += '#include <stdint.h>\n\n'; 69 + 70 + c += 'static const char* tz_name_pool[] = {\n'; 71 + namePool.forEach(n=>{ c += ` "${n}",\n`; }); 72 + c += '};\n\n'; 73 + 74 + c += 'typedef struct {\n'; 75 + c += ' float std_offset_hours;\n'; 76 + c += ' float dst_offset_hours;\n'; 77 + c += ' int64_t dst_start_utc;\n'; 78 + c += ' int64_t dst_end_utc;\n'; 79 + c += ' int name_offset;\n'; 80 + c += ' int name_count;\n'; 81 + c += '} TzInfo;\n\n'; 82 + 83 + c += 'static const TzInfo tz_list[] = {\n'; 84 + ordered.forEach(b=>{ 85 + c += ` { ${(b.std/3600).toFixed(2)}f, ${(b.dst/3600).toFixed(2)}f, ${b.start}LL, ${b.end}LL, ${b.nameOffset}, ${b.nameCount} },\n`; 86 + }); 87 + c += '};\n\n'; 88 + c += `#define TZ_LIST_COUNT (sizeof(tz_list)/sizeof(tz_list[0]))\n`; 89 + c += `#define TZ_NAME_POOL_COUNT (sizeof(tz_name_pool)/sizeof(tz_name_pool[0]))\n`; 90 + 91 + await fs.writeFile(outPath, c, 'utf-8'); 92 + console.log(`Wrote ${ordered.length} buckets and ${namePool.length} names to ${outPath}`); 93 + } 94 + 95 + // CLI 96 + if (require.main === module) { 97 + program 98 + .option('--out <path>', 'C output file', path.join(__dirname,'../src/c/tz_list.c')) 99 + .parse(process.argv); 100 + const { out } = program.opts(); 101 + generateTzCCode(out).catch(err=>{ console.error(err); process.exit(1); }); 102 + }
+4 -2
scripts/package.json
··· 10 10 }, 11 11 "dependencies": { 12 12 "@types/commander": "^2.12.5", 13 - "@vvo/tzdb": "^6", 13 + "@vvo/tzdb": "^6.161.0", 14 14 "airport-data": "^1.0.1", 15 15 "cheerio": "^1", 16 16 "commander": "^13.1.0", 17 17 "csv-parse": "^5", 18 18 "geo-tz": "^8", 19 - "luxon": "^3" 19 + "luxon": "^3", 20 + "timezonecomplete": "^5.13.1", 21 + "tzdata": "^1.0.44" 20 22 }, 21 23 "devDependencies": { 22 24 "typescript": "^5",
+75 -221
src/c/tz_list.c
··· 1 - // Generated by Python script using zoneinfo 2 - // Contains Standard & DST offsets for 2025. 3 - // WARNING: DST rules accurate only for the generated year. 1 + // Auto-generated by generateTzList.ts 2 + // Year 2025 DST data (Luxon / IANA) 4 3 5 4 #include <stdint.h> 6 5 ··· 9 8 "Niue", 10 9 "Pago Pago", 11 10 "Honolulu", 12 - "Johnston", 13 11 "Rarotonga", 14 12 "Tahiti", 15 13 "Adak", 16 - "Atka", 17 14 "Marquesas", 18 15 "Gambier", 19 16 "Anchorage", 20 - "Juneau", 21 - "Metlakatla", 22 - "Nome", 23 - "Sitka", 24 - "Yakutat", 25 17 "Pitcairn", 26 - "BajaNorte", 27 - "Ensenada", 28 18 "Los Angeles", 29 - "Santa Isabel", 30 19 "Tijuana", 31 20 "Vancouver", 32 - "BajaSur", 33 - "Creston", 34 - "Dawson", 35 - "Dawson Creek", 36 - "Fort Nelson", 37 21 "Hermosillo", 38 - "Mazatlan", 39 22 "Phoenix", 40 23 "Whitehorse", 41 - "Boise", 42 - "Cambridge Bay", 43 24 "Ciudad Juarez", 44 25 "Denver", 45 26 "Edmonton", 46 - "Inuvik", 47 - "Shiprock", 48 - "Yellowknife", 49 - "Bahia Banderas", 50 27 "Belize", 51 - "Chihuahua", 52 28 "Costa Rica", 53 29 "El Salvador", 54 30 "Galapagos", 55 31 "Guatemala", 56 32 "Managua", 57 - "Merida", 58 33 "Mexico City", 59 - "Monterrey", 60 34 "Regina", 61 - "Swift Current", 62 35 "Tegucigalpa", 63 - "Beulah", 64 - "Center", 65 36 "Chicago", 66 - "Indiana-Starke", 67 - "Knox", 68 37 "Matamoros", 69 - "Menominee", 70 - "New Salem", 71 - "Ojinaga", 72 - "Rainy River", 73 - "Rankin Inlet", 74 - "Resolute", 75 - "Tell City", 76 38 "Winnipeg", 77 39 "Easter", 78 40 "Atikokan", 79 41 "Bogota", 80 42 "Cancun", 81 43 "Cayman", 82 - "Coral Harbour", 83 - "Eirunepe", 84 44 "Guayaquil", 45 + "Jamaica", 85 46 "Lima", 86 47 "Panama", 87 - "Porto Acre", 88 48 "Rio Branco", 89 49 "Havana", 90 - "Detroit", 91 - "Fort Wayne", 92 50 "Grand Turk", 93 - "Indianapolis", 94 - "Iqaluit", 95 - "Louisville", 96 - "Marengo", 97 - "Monticello", 98 - "Montreal", 99 51 "Nassau", 100 52 "New York", 101 - "Nipigon", 102 - "Pangnirtung", 103 - "Petersburg", 104 53 "Port-au-Prince", 105 - "Thunder Bay", 106 54 "Toronto", 107 - "Vevay", 108 - "Vincennes", 109 - "Winamac", 110 55 "Anguilla", 111 56 "Antigua", 112 57 "Aruba", 113 58 "Barbados", 114 59 "Blanc-Sablon", 115 - "Boa Vista", 116 - "Campo Grande", 117 60 "Caracas", 118 - "Cuiaba", 119 61 "Curacao", 120 62 "Dominica", 121 63 "Grenada", ··· 129 71 "Martinique", 130 72 "Montserrat", 131 73 "Port of Spain", 132 - "Porto Velho", 133 74 "Puerto Rico", 134 75 "Santo Domingo", 135 76 "St Barthelemy", ··· 138 79 "St Thomas", 139 80 "St Vincent", 140 81 "Tortola", 141 - "Virgin", 142 82 "Bermuda", 143 - "Glace Bay", 144 - "Goose Bay", 145 83 "Halifax", 146 - "Moncton", 147 84 "Thule", 148 85 "Santiago", 149 86 "St Johns", 150 - "Araguaina", 151 87 "Asuncion", 152 - "Belem", 153 88 "Buenos Aires", 154 - "Catamarca", 155 89 "Cayenne", 156 - "ComodRivadavia", 157 - "Cordoba", 158 - "Coyhaique", 159 - "Fortaleza", 160 - "Jujuy", 161 - "La Rioja", 162 - "Maceio", 163 - "Mendoza", 164 90 "Montevideo", 165 91 "Palmer", 166 92 "Paramaribo", 167 93 "Punta Arenas", 168 - "Recife", 169 - "Rio Gallegos", 170 - "Rosario", 171 - "Rothera", 172 - "Salta", 173 - "San Juan", 174 - "San Luis", 175 - "Santarem", 176 94 "Sao Paulo", 177 95 "Stanley", 178 - "Tucuman", 179 - "Ushuaia", 180 96 "Miquelon", 181 - "DeNoronha", 182 - "Godthab", 97 + "Noronha", 98 + "South Georgia", 183 99 "Nuuk", 184 - "Scoresbysund", 185 100 "Cape Verde", 186 101 "Azores", 187 102 "Abidjan", ··· 200 115 "Reykjavik", 201 116 "Sao Tome", 202 117 "St Helena", 203 - "Timbuktu", 204 - "Belfast", 118 + "Canary", 205 119 "Dublin", 120 + "Faroe", 121 + "Guernsey", 122 + "Isle of Man", 123 + "Jersey", 206 124 "Lisbon", 207 125 "London", 208 - "Casablanca", 209 - "El Aaiun", 210 126 "Troll", 211 127 "Algiers", 212 128 "Bangui", 213 129 "Brazzaville", 130 + "Casablanca", 214 131 "Douala", 132 + "El Aaiun", 215 133 "Kinshasa", 216 134 "Lagos", 217 135 "Libreville", ··· 228 146 "Bratislava", 229 147 "Brussels", 230 148 "Budapest", 231 - "Busingen", 232 - "Ceuta", 233 149 "Copenhagen", 234 150 "Gibraltar", 235 151 "Ljubljana", ··· 271 187 "Tripoli", 272 188 "Windhoek", 273 189 "Jerusalem", 274 - "Tel Aviv", 275 190 "Beirut", 276 191 "Chisinau", 277 - "Tiraspol", 278 192 "Athens", 279 193 "Bucharest", 280 - "Famagusta", 281 194 "Helsinki", 282 - "Kiev", 283 195 "Kyiv", 284 196 "Mariehamn", 285 197 "Nicosia", 286 198 "Riga", 287 199 "Sofia", 288 200 "Tallinn", 289 - "Uzhgorod", 290 201 "Vilnius", 291 - "Zaporozhye", 292 - "Gaza", 293 202 "Hebron", 294 203 "Cairo", 295 204 "Addis Ababa", ··· 297 206 "Amman", 298 207 "Antananarivo", 299 208 "Asmara", 300 - "Asmera", 301 209 "Baghdad", 302 210 "Bahrain", 303 211 "Comoro", ··· 306 214 "Djibouti", 307 215 "Istanbul", 308 216 "Kampala", 309 - "Kirov", 310 217 "Kuwait", 311 218 "Mayotte", 312 219 "Minsk", ··· 317 224 "Riyadh", 318 225 "Simferopol", 319 226 "Syowa", 320 - "Volgograd", 321 227 "Tehran", 322 - "Astrakhan", 323 228 "Baku", 324 229 "Dubai", 325 230 "Mahe", ··· 327 232 "Muscat", 328 233 "Reunion", 329 234 "Samara", 330 - "Saratov", 331 235 "Tbilisi", 332 - "Ulyanovsk", 333 236 "Yerevan", 334 237 "Kabul", 335 238 "Almaty", 336 - "Aqtau", 337 - "Aqtobe", 338 239 "Ashgabat", 339 - "Ashkhabad", 340 - "Atyrau", 341 240 "Dushanbe", 342 241 "Karachi", 343 242 "Kerguelen", 344 243 "Maldives", 345 244 "Mawson", 346 - "Oral", 347 - "Qostanay", 348 - "Qyzylorda", 349 - "Samarkand", 350 245 "Tashkent", 351 - "Vostok", 352 246 "Yekaterinburg", 353 - "Calcutta", 354 247 "Colombo", 355 248 "Kolkata", 356 249 "Kathmandu", 357 - "Katmandu", 358 250 "Bishkek", 359 251 "Chagos", 360 - "Dacca", 361 252 "Dhaka", 362 - "Kashgar", 363 253 "Omsk", 364 - "Thimbu", 365 254 "Thimphu", 366 255 "Urumqi", 367 256 "Cocos", 368 - "Rangoon", 369 257 "Yangon", 370 258 "Bangkok", 371 - "Barnaul", 372 259 "Christmas", 373 260 "Davis", 374 261 "Ho Chi Minh", 375 262 "Hovd", 376 263 "Jakarta", 377 - "Krasnoyarsk", 378 - "Novokuznetsk", 379 264 "Novosibirsk", 380 265 "Phnom Penh", 381 - "Pontianak", 382 - "Saigon", 383 - "Tomsk", 384 266 "Vientiane", 385 267 "Brunei", 386 268 "Casey", 387 - "Choibalsan", 388 - "Chongqing", 389 - "Chungking", 390 - "Harbin", 391 269 "Hong Kong", 392 270 "Irkutsk", 393 271 "Kuala Lumpur", 394 - "Kuching", 395 - "Macao", 396 272 "Macau", 397 273 "Makassar", 398 274 "Manila", ··· 400 276 "Shanghai", 401 277 "Singapore", 402 278 "Taipei", 403 - "Ujung Pandang", 404 279 "Ulaanbaatar", 405 - "Ulan Bator", 406 280 "Eucla", 407 281 "Chita", 408 282 "Dili", 409 283 "Jayapura", 410 - "Khandyga", 411 284 "Palau", 412 285 "Pyongyang", 413 286 "Seoul", 414 287 "Tokyo", 415 - "Yakutsk", 416 288 "Darwin", 417 289 "Adelaide", 418 - "Broken Hill", 419 - "Yancowinna", 420 290 "Brisbane", 421 291 "Chuuk", 422 292 "DumontDUrville", 423 293 "Guam", 424 - "Lindeman", 425 294 "Port Moresby", 426 295 "Saipan", 427 - "Truk", 428 - "Ust-Nera", 429 296 "Vladivostok", 430 - "Canberra", 431 - "Currie", 432 - "Hobart", 433 - "Macquarie", 434 - "Melbourne", 435 297 "Sydney", 436 - "LHI", 437 298 "Lord Howe", 438 299 "Bougainville", 439 300 "Efate", 440 301 "Guadalcanal", 441 302 "Kosrae", 442 - "Magadan", 443 303 "Noumea", 444 - "Pohnpei", 445 - "Ponape", 446 304 "Sakhalin", 447 - "Srednekolymsk", 448 305 "Norfolk", 449 - "Anadyr", 450 306 "Fiji", 451 307 "Funafuti", 452 308 "Kamchatka", 453 - "Kwajalein", 454 309 "Majuro", 455 310 "Nauru", 456 311 "Tarawa", ··· 460 315 "McMurdo", 461 316 "Chatham", 462 317 "Apia", 463 - "Enderbury", 464 318 "Fakaofo", 319 + "Kanton", 465 320 "Tongatapu", 466 321 "Kiritimati", 467 322 }; ··· 477 332 478 333 static const TzInfo tz_list[] = { 479 334 { -11.00f, -11.00f, 0LL, 0LL, 0, 3 }, 480 - { -10.00f, -10.00f, 0LL, 0LL, 3, 4 }, 481 - { -10.00f, -9.00f, 1741489200LL, 1762048800LL, 7, 2 }, 482 - { -9.50f, -9.50f, 0LL, 0LL, 9, 1 }, 483 - { -9.00f, -9.00f, 0LL, 0LL, 10, 1 }, 484 - { -9.00f, -8.00f, 1741489200LL, 1762048800LL, 11, 6 }, 485 - { -8.00f, -8.00f, 0LL, 0LL, 17, 1 }, 486 - { -8.00f, -7.00f, 1741489200LL, 1762048800LL, 18, 6 }, 487 - { -7.00f, -7.00f, 0LL, 0LL, 24, 9 }, 488 - { -7.00f, -6.00f, 1741489200LL, 1762048800LL, 33, 8 }, 489 - { -6.00f, -6.00f, 0LL, 0LL, 41, 14 }, 490 - { -6.00f, -5.00f, 1741489200LL, 1762048800LL, 55, 14 }, 491 - { -6.00f, -5.00f, 1757199600LL, 1743890400LL, 69, 1 }, 492 - { -5.00f, -5.00f, 0LL, 0LL, 70, 11 }, 493 - { -5.00f, -4.00f, 1741482000LL, 1762045200LL, 81, 1 }, 494 - { -5.00f, -4.00f, 1741489200LL, 1762048800LL, 82, 20 }, 495 - { -4.00f, -4.00f, 0LL, 0LL, 102, 32 }, 496 - { -4.00f, -3.00f, 1741489200LL, 1762048800LL, 134, 6 }, 497 - { -4.00f, -3.00f, 1757206800LL, 1743897600LL, 140, 1 }, 498 - { -3.50f, -2.50f, 1741489200LL, 1762048800LL, 141, 1 }, 499 - { -3.00f, -3.00f, 0LL, 0LL, 142, 30 }, 500 - { -3.00f, -2.00f, 1741489200LL, 1762048800LL, 172, 1 }, 501 - { -2.00f, -2.00f, 0LL, 0LL, 173, 1 }, 502 - { -2.00f, -1.00f, 1743292800LL, 1761436800LL, 174, 3 }, 503 - { -1.00f, -1.00f, 0LL, 0LL, 177, 1 }, 504 - { -1.00f, 0.00f, 1743296400LL, 1761440400LL, 178, 1 }, 505 - { 0.00f, 0.00f, 0LL, 0LL, 179, 17 }, 506 - { 0.00f, 1.00f, 1743300000LL, 1761444000LL, 196, 4 }, 507 - { 0.00f, 1.00f, 1743908400LL, 1740279600LL, 200, 2 }, 508 - { 0.00f, 2.00f, 1743303600LL, 1761447600LL, 202, 1 }, 509 - { 1.00f, 1.00f, 0LL, 0LL, 203, 13 }, 510 - { 1.00f, 2.00f, 1743303600LL, 1761447600LL, 216, 33 }, 511 - { 2.00f, 2.00f, 0LL, 0LL, 249, 16 }, 512 - { 2.00f, 3.00f, 1743130800LL, 1761444000LL, 265, 2 }, 513 - { 2.00f, 3.00f, 1743296400LL, 1761436800LL, 267, 1 }, 514 - { 2.00f, 3.00f, 1743303600LL, 1761447600LL, 268, 2 }, 515 - { 2.00f, 3.00f, 1743307200LL, 1761451200LL, 270, 14 }, 516 - { 2.00f, 3.00f, 1744426800LL, 1761357600LL, 284, 2 }, 517 - { 2.00f, 3.00f, 1745542800LL, 1761868800LL, 286, 1 }, 518 - { 3.00f, 3.00f, 0LL, 0LL, 287, 26 }, 519 - { 3.50f, 3.50f, 0LL, 0LL, 313, 1 }, 520 - { 4.00f, 4.00f, 0LL, 0LL, 314, 12 }, 521 - { 4.50f, 4.50f, 0LL, 0LL, 326, 1 }, 522 - { 5.00f, 5.00f, 0LL, 0LL, 327, 18 }, 523 - { 5.50f, 5.50f, 0LL, 0LL, 345, 3 }, 524 - { 5.75f, 5.75f, 0LL, 0LL, 348, 2 }, 525 - { 6.00f, 6.00f, 0LL, 0LL, 350, 9 }, 526 - { 6.50f, 6.50f, 0LL, 0LL, 359, 3 }, 527 - { 7.00f, 7.00f, 0LL, 0LL, 362, 15 }, 528 - { 8.00f, 8.00f, 0LL, 0LL, 377, 21 }, 529 - { 8.75f, 8.75f, 0LL, 0LL, 398, 1 }, 530 - { 9.00f, 9.00f, 0LL, 0LL, 399, 9 }, 531 - { 9.50f, 9.50f, 0LL, 0LL, 408, 1 }, 532 - { 9.50f, 10.50f, 1759633200LL, 1743908400LL, 409, 3 }, 533 - { 10.00f, 10.00f, 0LL, 0LL, 412, 10 }, 534 - { 10.00f, 11.00f, 1759633200LL, 1743908400LL, 422, 6 }, 535 - { 10.50f, 11.00f, 1759633200LL, 1743904800LL, 428, 2 }, 536 - { 11.00f, 11.00f, 0LL, 0LL, 430, 10 }, 537 - { 11.00f, 12.00f, 1759633200LL, 1743908400LL, 440, 1 }, 538 - { 12.00f, 12.00f, 0LL, 0LL, 441, 10 }, 539 - { 12.00f, 13.00f, 1759028400LL, 1743908400LL, 451, 2 }, 540 - { 12.75f, 13.75f, 1759032000LL, 1743912000LL, 453, 1 }, 541 - { 13.00f, 13.00f, 0LL, 0LL, 454, 4 }, 542 - { 14.00f, 14.00f, 0LL, 0LL, 458, 1 }, 335 + { -10.00f, -10.00f, 0LL, 0LL, 3, 3 }, 336 + { -10.00f, -9.00f, 1741521600LL, 1762081200LL, 6, 1 }, 337 + { -9.50f, -9.50f, 0LL, 0LL, 7, 1 }, 338 + { -9.00f, -9.00f, 0LL, 0LL, 8, 1 }, 339 + { -9.00f, -8.00f, 1741518000LL, 1762077600LL, 9, 1 }, 340 + { -8.00f, -8.00f, 0LL, 0LL, 10, 1 }, 341 + { -8.00f, -7.00f, 1741514400LL, 1762074000LL, 11, 3 }, 342 + { -7.00f, -7.00f, 0LL, 0LL, 14, 3 }, 343 + { -7.00f, -6.00f, 1741510800LL, 1762070400LL, 17, 3 }, 344 + { -6.00f, -6.00f, 0LL, 0LL, 20, 9 }, 345 + { -6.00f, -5.00f, 1741507200LL, 1762066800LL, 29, 3 }, 346 + { -6.00f, -5.00f, 1757217600LL, 1743908400LL, 32, 1 }, 347 + { -5.00f, -5.00f, 0LL, 0LL, 33, 9 }, 348 + { -5.00f, -4.00f, 1741496400LL, 1762059600LL, 42, 1 }, 349 + { -5.00f, -4.00f, 1741503600LL, 1762063200LL, 43, 5 }, 350 + { -4.00f, -4.00f, 0LL, 0LL, 48, 27 }, 351 + { -4.00f, -3.00f, 1741500000LL, 1762059600LL, 75, 3 }, 352 + { -4.00f, -3.00f, 1757217600LL, 1743908400LL, 78, 1 }, 353 + { -3.50f, -2.50f, 1741496400LL, 1762056000LL, 79, 1 }, 354 + { -3.00f, -3.00f, 0LL, 0LL, 80, 9 }, 355 + { -3.00f, -2.00f, 1741496400LL, 1762056000LL, 89, 1 }, 356 + { -2.00f, -2.00f, 0LL, 0LL, 90, 2 }, 357 + { -2.00f, -1.00f, 1743296400LL, 1761440400LL, 92, 1 }, 358 + { -1.00f, -1.00f, 0LL, 0LL, 93, 1 }, 359 + { -1.00f, 0.00f, 1743296400LL, 1761440400LL, 94, 1 }, 360 + { 0.00f, 0.00f, 0LL, 0LL, 95, 16 }, 361 + { 0.00f, 1.00f, 1743296400LL, 1761440400LL, 111, 8 }, 362 + { 0.00f, 2.00f, 1743296400LL, 1761440400LL, 119, 1 }, 363 + { 1.00f, 1.00f, 0LL, 0LL, 120, 15 }, 364 + { 1.00f, 2.00f, 1743296400LL, 1761440400LL, 135, 31 }, 365 + { 2.00f, 2.00f, 0LL, 0LL, 166, 16 }, 366 + { 2.00f, 3.00f, 1743120000LL, 1761433200LL, 182, 1 }, 367 + { 2.00f, 3.00f, 1743285600LL, 1761426000LL, 183, 1 }, 368 + { 2.00f, 3.00f, 1743292800LL, 1761436800LL, 184, 1 }, 369 + { 2.00f, 3.00f, 1743296400LL, 1761440400LL, 185, 10 }, 370 + { 2.00f, 3.00f, 1744416000LL, 1761346800LL, 195, 1 }, 371 + { 2.00f, 3.00f, 1745532000LL, 1761858000LL, 196, 1 }, 372 + { 3.00f, 3.00f, 0LL, 0LL, 197, 23 }, 373 + { 3.50f, 3.50f, 0LL, 0LL, 220, 1 }, 374 + { 4.00f, 4.00f, 0LL, 0LL, 221, 9 }, 375 + { 4.50f, 4.50f, 0LL, 0LL, 230, 1 }, 376 + { 5.00f, 5.00f, 0LL, 0LL, 231, 9 }, 377 + { 5.50f, 5.50f, 0LL, 0LL, 240, 2 }, 378 + { 5.75f, 5.75f, 0LL, 0LL, 242, 1 }, 379 + { 6.00f, 6.00f, 0LL, 0LL, 243, 6 }, 380 + { 6.50f, 6.50f, 0LL, 0LL, 249, 2 }, 381 + { 7.00f, 7.00f, 0LL, 0LL, 251, 9 }, 382 + { 8.00f, 8.00f, 0LL, 0LL, 260, 13 }, 383 + { 8.75f, 8.75f, 0LL, 0LL, 273, 1 }, 384 + { 9.00f, 9.00f, 0LL, 0LL, 274, 7 }, 385 + { 9.50f, 9.50f, 0LL, 0LL, 281, 1 }, 386 + { 9.50f, 10.50f, 1759593600LL, 1743872400LL, 282, 1 }, 387 + { 10.00f, 10.00f, 0LL, 0LL, 283, 7 }, 388 + { 10.00f, 11.00f, 1759593600LL, 1743868800LL, 290, 1 }, 389 + { 10.50f, 11.00f, 1759593600LL, 1743865200LL, 291, 1 }, 390 + { 11.00f, 11.00f, 0LL, 0LL, 292, 6 }, 391 + { 11.00f, 12.00f, 1759590000LL, 1743865200LL, 298, 1 }, 392 + { 12.00f, 12.00f, 0LL, 0LL, 299, 8 }, 393 + { 12.00f, 13.00f, 1758981600LL, 1743861600LL, 307, 2 }, 394 + { 12.75f, 13.75f, 1758981600LL, 1743861600LL, 309, 1 }, 395 + { 13.00f, 13.00f, 0LL, 0LL, 310, 4 }, 396 + { 14.00f, 14.00f, 0LL, 0LL, 314, 1 }, 543 397 }; 544 398 545 399 #define TZ_LIST_COUNT (sizeof(tz_list)/sizeof(tz_list[0]))