this repo has no description
0
fork

Configure Feed

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

logic fixes, simpler list

alice 3858900f e57f870a

+607 -879
+36 -45
generate_tz_list.py
··· 176 176 tz_data_list = sorted(processed_zones.values(), key=lambda x: (x["std_offset_s"], x["dst_offset_s"])) 177 177 print(f"Generated data for {len(tz_data_list)} unique offset/DST rule combinations.") 178 178 179 - # --- C Code Generation --- 180 - # Build C code string (no obvious dead code here) 179 + # --- C Code Generation: Flatten name pool and tz_list entries --- 180 + # Build a flat pool of city names and compute offsets 181 + names_pool = [] 182 + for zone in tz_data_list: 183 + sorted_names = sorted(zone['names']) 184 + zone['name_offset'] = len(names_pool) 185 + zone['name_count'] = len(sorted_names) 186 + names_pool.extend(sorted_names) 187 + 188 + # Begin C output 181 189 c_code = "// Generated by Python script using zoneinfo\n" 182 - c_code += f"// Includes Standard & DST offsets and UTC transition timestamps for {target_year}.\n" 190 + c_code += f"// Contains Standard & DST offsets for {target_year}.\n" 183 191 c_code += "// WARNING: DST rules accurate only for the generated year.\n\n" 184 - # Include stdint.h for int64_t type used below 185 192 c_code += "#include <stdint.h>\n\n" 186 - c_code += "// Holds a single city name string\n" 187 - c_code += "typedef struct {\n" 188 - c_code += " const char* name;\n" 189 - c_code += "} TzCityName;\n\n" 190 - c_code += "// Holds offset info and points to an array of names\n" 193 + 194 + # Flattened list of all city names 195 + c_code += "static const char* tz_name_pool[] = {\n" 196 + for name in names_pool: 197 + c_code += f" \"{name}\",\n" 198 + c_code += "};\n\n" 199 + 200 + # TzInfo struct with name pool indices 191 201 c_code += "typedef struct {\n" 192 - c_code += " float std_offset_hours; // Offset during standard time\n" 193 - c_code += " float dst_offset_hours; // Offset during daylight time (if applicable)\n" 194 - # Using int64_t for Pebble time_t safety, check SDK if 32-bit preferred 195 - c_code += " int64_t dst_start_utc; // UTC timestamp (time_t) for DST start (0 if N/A)\n" 196 - c_code += " int64_t dst_end_utc; // UTC timestamp (time_t) for DST end (0 if N/A)\n" 197 - c_code += " const TzCityName* names; // Pointer to the array of names\n" 198 - c_code += " int name_count; // How many names are in the array\n" 202 + c_code += " float std_offset_hours;\n" 203 + c_code += " float dst_offset_hours;\n" 204 + c_code += " int64_t dst_start_utc;\n" 205 + c_code += " int64_t dst_end_utc;\n" 206 + c_code += " int name_offset;\n" 207 + c_code += " int name_count;\n" 199 208 c_code += "} TzInfo;\n\n" 200 209 201 - # Generate the static arrays of names first 202 - name_array_definitions = "" 203 - unique_names_id = 0 204 - for zone_data in tz_data_list: 205 - c_array_name = f"tz_names_{unique_names_id}" 206 - zone_data["c_array_name"] = c_array_name # Store for later use 207 - unique_names_id += 1 208 - name_array_definitions += f"static const TzCityName {c_array_name}[] = {{\n" 209 - # Sort names alphabetically for consistency 210 - for name in sorted(zone_data["names"]): 211 - name_array_definitions += f" {{ \"{name}\" }},\n" 212 - name_array_definitions += "};\n\n" 213 - c_code += name_array_definitions 214 - 215 - # Generate the main tz_list array 216 - c_code += "// Main list mapping offsets/DST info to their respective name arrays\n" 210 + # Main tz_list entries 217 211 c_code += "static const TzInfo tz_list[] = {\n" 218 - for zone_data in tz_data_list: 219 - # Convert offsets to hours ONLY for C code generation 220 - std_offset_h_c = zone_data['std_offset_s'] / 3600.0 221 - dst_offset_h_c = zone_data['dst_offset_s'] / 3600.0 222 - c_array_name = zone_data["c_array_name"] 223 - name_count = len(zone_data["names"]) 224 - # Use 'LL' suffix for int64_t timestamp constants in C 225 - c_code += (f" {{ {std_offset_h_c:.2f}f, {dst_offset_h_c:.2f}f, " 226 - f"{zone_data['start_utc']}LL, {zone_data['end_utc']}LL, " 227 - f"{c_array_name}, {name_count} }},\n") 228 - 212 + for zone in tz_data_list: 213 + std_h = zone['std_offset_s'] / 3600.0 214 + dst_h = zone['dst_offset_s'] / 3600.0 215 + start = zone['start_utc'] 216 + end = zone['end_utc'] 217 + offs = zone['name_offset'] 218 + cnt = zone['name_count'] 219 + c_code += f" {{ {std_h:.2f}f, {dst_h:.2f}f, {start}LL, {end}LL, {offs}, {cnt} }},\n" 229 220 c_code += "};\n\n" 230 - c_code += f"#define TZ_LIST_COUNT {len(tz_data_list)}\n" 231 - 221 + c_code += f"#define TZ_LIST_COUNT (sizeof(tz_list)/sizeof(tz_list[0]))\n" 222 + c_code += f"#define TZ_NAME_POOL_COUNT (sizeof(tz_name_pool)/sizeof(tz_name_pool[0]))\n" 232 223 return c_code 233 224 234 225 # --- Main execution ---
+38 -106
src/c/clock_closest_noon.c
··· 36 36 * @param current_utc_t The current UTC time as time_t. 37 37 */ 38 38 static void update_selected_timezone_and_city(time_t current_utc_t) { 39 - // Seed random number generator (important for random selection) 39 + // Seed for consistent randomness when multiple zones tie 40 40 srand(current_utc_t); 41 - 42 - // Find the minimum local time that is >= noon 43 - long min_valid_local_seconds = DAY_SECONDS; // Initialize higher than any possible time 44 - 45 - // Structure to hold candidate timezone info 46 - typedef struct { 47 - int index; // Index in tz_list 48 - long local_secs_today; // Local time in seconds past midnight 49 - float active_offset_h; // The offset used for calculation 50 - } ZoneCandidate; 51 - 52 - ZoneCandidate candidates[TZ_LIST_COUNT]; 53 - int candidate_count = 0; // Count of zones with time >= noon 54 - 55 - uint32_t utc_seconds_today = current_utc_t % DAY_SECONDS; 56 - 57 - // --- Pass 1: Calculate local time for all zones, filter >= noon, find minimum valid time --- 58 - for (int i = 0; i < TZ_LIST_COUNT; ++i) { 41 + uint32_t utc_secs = current_utc_t % DAY_SECONDS; 42 + long best_delta = LONG_MAX; 43 + int best_count = 0; 44 + int best_candidates[TZ_LIST_COUNT]; 45 + // Find zones that have local time >= noon and minimal seconds past noon 46 + for (int i = 0; i < (int)TZ_LIST_COUNT; ++i) { 59 47 const TzInfo *tz = &tz_list[i]; 60 - bool is_dst_active = false; 61 - 62 - // --- Determine if DST is active --- 63 - if (tz->dst_start_utc != 0LL && tz->dst_end_utc != 0LL) { 64 - int64_t start_time = tz->dst_start_utc; 65 - int64_t end_time = tz->dst_end_utc; 66 - int64_t current_time_64 = (int64_t)current_utc_t; 67 - // Standard check for non-wrapping interval 68 - if (start_time <= end_time) { 69 - if (current_time_64 >= start_time && current_time_64 < end_time) { 70 - is_dst_active = true; 71 - } 72 - } 73 - // Check for wrapping interval (e.g., Southern Hemisphere DST) 74 - else { 75 - if (current_time_64 >= start_time || current_time_64 < end_time) { 76 - is_dst_active = true; 77 - } 78 - } 79 - } 80 - 81 - float active_offset_hours = is_dst_active ? tz->dst_offset_hours : tz->std_offset_hours; 82 - long offset_seconds = (long)(active_offset_hours * 3600.0f); 83 - 84 - // Calculate local time in seconds past local midnight 85 - long local_seconds_today = ((long)utc_seconds_today + offset_seconds); 86 - // Ensure positive modulo result within the day 87 - local_seconds_today %= DAY_SECONDS; 88 - if (local_seconds_today < 0) { 89 - local_seconds_today += DAY_SECONDS; 90 - } 91 - 92 - // --- Check if local time is at or after noon --- 93 - if (local_seconds_today >= NOON_SECONDS) { 94 - // Store as a potential candidate 95 - if (candidate_count < TZ_LIST_COUNT) { 96 - candidates[candidate_count].index = i; 97 - candidates[candidate_count].local_secs_today = local_seconds_today; 98 - candidates[candidate_count].active_offset_h = active_offset_hours; 99 - candidate_count++; // Increment count of valid candidates 100 - } 101 - // Update the minimum valid local time found so far 102 - if (local_seconds_today < min_valid_local_seconds) { 103 - min_valid_local_seconds = local_seconds_today; 48 + // Determine DST active 49 + bool is_dst = false; 50 + if (tz->dst_start_utc && tz->dst_end_utc) { 51 + int64_t now = (int64_t)current_utc_t; 52 + if ((tz->dst_start_utc <= tz->dst_end_utc && now >= tz->dst_start_utc && now < tz->dst_end_utc) || 53 + (tz->dst_start_utc > tz->dst_end_utc && (now >= tz->dst_start_utc || now < tz->dst_end_utc))) { 54 + is_dst = true; 104 55 } 105 56 } 106 - } 107 - 108 - // --- Pass 2: Collect all candidates matching the minimum valid local time --- 109 - int best_candidates_indices[TZ_LIST_COUNT]; // Stores indices into 'candidates' array 110 - int best_candidate_count = 0; 111 - if (candidate_count > 0) { // Only proceed if we found any zones >= noon 112 - for (int k = 0; k < candidate_count; ++k) { 113 - // Check if this candidate's time is the minimum valid time we found 114 - if (candidates[k].local_secs_today == min_valid_local_seconds) { 115 - if (best_candidate_count < TZ_LIST_COUNT) { 116 - best_candidates_indices[best_candidate_count++] = k; // Store index into 'candidates' array 117 - } 118 - } 57 + float off_h = is_dst ? tz->dst_offset_hours : tz->std_offset_hours; 58 + long local_secs = (long)utc_secs + (long)(off_h * 3600.0f); 59 + local_secs %= DAY_SECONDS; 60 + if (local_secs < 0) local_secs += DAY_SECONDS; 61 + if (local_secs < NOON_SECONDS) continue; 62 + long delta = local_secs - NOON_SECONDS; 63 + if (delta < best_delta) { 64 + best_delta = delta; 65 + best_count = 0; 66 + best_candidates[best_count++] = i; 67 + } else if (delta == best_delta && best_count < (int)TZ_LIST_COUNT) { 68 + best_candidates[best_count++] = i; 119 69 } 120 70 } 121 - 122 - 123 - // --- Select the winning timezone and city --- 124 - if (best_candidate_count > 0) { 125 - // Randomly select one of the best candidates 126 - int list_pos = (best_candidate_count == 1) ? 0 : (rand() % best_candidate_count); 127 - int winning_candidate_idx_in_candidates = best_candidates_indices[list_pos]; // Index in 'candidates' array 128 - 129 - int chosen_zone_list_index = candidates[winning_candidate_idx_in_candidates].index; // Index in tz_list 130 - const TzInfo *chosen_tz = &tz_list[chosen_zone_list_index]; 131 - 132 - // Randomly select a city name from the winning timezone 133 - if (chosen_tz->name_count > 0) { 134 - int name_index = (chosen_tz->name_count == 1) ? 0 : (rand() % chosen_tz->name_count); 135 - // Basic bounds check (should always be true if rand() works correctly) 136 - if (name_index >= 0 && name_index < chosen_tz->name_count) { 137 - s_selected_city_name = chosen_tz->names[name_index].name; 138 - } else { 139 - s_selected_city_name = "ERR:NAME"; // Safety fallback 140 - } 141 - } else { 142 - s_selected_city_name = "ERR:NO_NM"; // Safety fallback 143 - } 144 - // Store the active offset that was used for this winning timezone 145 - s_selected_offset_hours = candidates[winning_candidate_idx_in_candidates].active_offset_h; 146 - 71 + if (best_count == 0) { 72 + s_selected_city_name = "Wait..."; 73 + s_selected_offset_hours = 0.0f; 147 74 } else { 148 - // This case handles when NO timezone has local time >= 12:00:00 PM 149 - s_selected_city_name = "Wait..."; // Indicate searching or fallback state 150 - s_selected_offset_hours = 0.0f; // Reset offset 75 + int pick = (best_count == 1) ? 0 : (rand() % best_count); 76 + int idx = best_candidates[pick]; 77 + const TzInfo *tz = &tz_list[idx]; 78 + bool is_dst = (current_utc_t >= tz->dst_start_utc && current_utc_t < tz->dst_end_utc); 79 + s_selected_offset_hours = is_dst ? tz->dst_offset_hours : tz->std_offset_hours; 80 + int cnt = tz->name_count; 81 + int ni = (cnt == 1) ? 0 : (rand() % cnt); 82 + s_selected_city_name = tz_name_pool[tz->name_offset + ni]; 151 83 } 152 - s_last_re_evaluation_time = current_utc_t; // Record when we last did this 84 + s_last_re_evaluation_time = current_utc_t; 153 85 } 154 86 155 87
+533 -728
src/c/tz_list.c
··· 1 1 // Generated by Python script using zoneinfo 2 - // Includes Standard & DST offsets and UTC transition timestamps for 2025. 2 + // Contains Standard & DST offsets for 2025. 3 3 // WARNING: DST rules accurate only for the generated year. 4 4 5 5 #include <stdint.h> 6 6 7 - // Holds a single city name string 8 - typedef struct { 9 - const char* name; 10 - } TzCityName; 7 + static const char* tz_name_pool[] = { 8 + "Midway", 9 + "Niue", 10 + "Pago Pago", 11 + "Honolulu", 12 + "Johnston", 13 + "Rarotonga", 14 + "Tahiti", 15 + "Adak", 16 + "Atka", 17 + "Marquesas", 18 + "Gambier", 19 + "Anchorage", 20 + "Juneau", 21 + "Metlakatla", 22 + "Nome", 23 + "Sitka", 24 + "Yakutat", 25 + "Pitcairn", 26 + "BajaNorte", 27 + "Ensenada", 28 + "Los Angeles", 29 + "Santa Isabel", 30 + "Tijuana", 31 + "Vancouver", 32 + "BajaSur", 33 + "Creston", 34 + "Dawson", 35 + "Dawson Creek", 36 + "Fort Nelson", 37 + "Hermosillo", 38 + "Mazatlan", 39 + "Phoenix", 40 + "Whitehorse", 41 + "Boise", 42 + "Cambridge Bay", 43 + "Ciudad Juarez", 44 + "Denver", 45 + "Edmonton", 46 + "Inuvik", 47 + "Shiprock", 48 + "Yellowknife", 49 + "Bahia Banderas", 50 + "Belize", 51 + "Chihuahua", 52 + "Costa Rica", 53 + "El Salvador", 54 + "Galapagos", 55 + "Guatemala", 56 + "Managua", 57 + "Merida", 58 + "Mexico City", 59 + "Monterrey", 60 + "Regina", 61 + "Swift Current", 62 + "Tegucigalpa", 63 + "Beulah", 64 + "Center", 65 + "Chicago", 66 + "Indiana-Starke", 67 + "Knox", 68 + "Matamoros", 69 + "Menominee", 70 + "New Salem", 71 + "Ojinaga", 72 + "Rainy River", 73 + "Rankin Inlet", 74 + "Resolute", 75 + "Tell City", 76 + "Winnipeg", 77 + "Easter", 78 + "Atikokan", 79 + "Bogota", 80 + "Cancun", 81 + "Cayman", 82 + "Coral Harbour", 83 + "Eirunepe", 84 + "Guayaquil", 85 + "Lima", 86 + "Panama", 87 + "Porto Acre", 88 + "Rio Branco", 89 + "Havana", 90 + "Detroit", 91 + "Fort Wayne", 92 + "Grand Turk", 93 + "Indianapolis", 94 + "Iqaluit", 95 + "Louisville", 96 + "Marengo", 97 + "Monticello", 98 + "Montreal", 99 + "Nassau", 100 + "New York", 101 + "Nipigon", 102 + "Pangnirtung", 103 + "Petersburg", 104 + "Port-au-Prince", 105 + "Thunder Bay", 106 + "Toronto", 107 + "Vevay", 108 + "Vincennes", 109 + "Winamac", 110 + "Anguilla", 111 + "Antigua", 112 + "Aruba", 113 + "Barbados", 114 + "Blanc-Sablon", 115 + "Boa Vista", 116 + "Campo Grande", 117 + "Caracas", 118 + "Cuiaba", 119 + "Curacao", 120 + "Dominica", 121 + "Grenada", 122 + "Guadeloupe", 123 + "Guyana", 124 + "Kralendijk", 125 + "La Paz", 126 + "Lower Princes", 127 + "Manaus", 128 + "Marigot", 129 + "Martinique", 130 + "Montserrat", 131 + "Port of Spain", 132 + "Porto Velho", 133 + "Puerto Rico", 134 + "Santo Domingo", 135 + "St Barthelemy", 136 + "St Kitts", 137 + "St Lucia", 138 + "St Thomas", 139 + "St Vincent", 140 + "Tortola", 141 + "Virgin", 142 + "Bermuda", 143 + "Glace Bay", 144 + "Goose Bay", 145 + "Halifax", 146 + "Moncton", 147 + "Thule", 148 + "Santiago", 149 + "St Johns", 150 + "Araguaina", 151 + "Asuncion", 152 + "Belem", 153 + "Buenos Aires", 154 + "Catamarca", 155 + "Cayenne", 156 + "ComodRivadavia", 157 + "Cordoba", 158 + "Fortaleza", 159 + "Jujuy", 160 + "La Rioja", 161 + "Maceio", 162 + "Mendoza", 163 + "Montevideo", 164 + "Palmer", 165 + "Paramaribo", 166 + "Punta Arenas", 167 + "Recife", 168 + "Rio Gallegos", 169 + "Rosario", 170 + "Rothera", 171 + "Salta", 172 + "San Juan", 173 + "San Luis", 174 + "Santarem", 175 + "Sao Paulo", 176 + "Stanley", 177 + "Tucuman", 178 + "Ushuaia", 179 + "Miquelon", 180 + "DeNoronha", 181 + "Godthab", 182 + "Nuuk", 183 + "Scoresbysund", 184 + "Cape Verde", 185 + "Azores", 186 + "Abidjan", 187 + "Accra", 188 + "Bamako", 189 + "Banjul", 190 + "Bissau", 191 + "Conakry", 192 + "Dakar", 193 + "Danmarkshavn", 194 + "Freetown", 195 + "Lome", 196 + "Monrovia", 197 + "Nouakchott", 198 + "Ouagadougou", 199 + "Reykjavik", 200 + "Sao Tome", 201 + "St Helena", 202 + "Timbuktu", 203 + "Casablanca", 204 + "El Aaiun", 205 + "Belfast", 206 + "Dublin", 207 + "Lisbon", 208 + "London", 209 + "Troll", 210 + "Algiers", 211 + "Bangui", 212 + "Brazzaville", 213 + "Douala", 214 + "Kinshasa", 215 + "Lagos", 216 + "Libreville", 217 + "Luanda", 218 + "Malabo", 219 + "Ndjamena", 220 + "Niamey", 221 + "Porto-Novo", 222 + "Tunis", 223 + "Amsterdam", 224 + "Andorra", 225 + "Belgrade", 226 + "Berlin", 227 + "Bratislava", 228 + "Brussels", 229 + "Budapest", 230 + "Busingen", 231 + "Ceuta", 232 + "Copenhagen", 233 + "Gibraltar", 234 + "Ljubljana", 235 + "Longyearbyen", 236 + "Luxembourg", 237 + "Madrid", 238 + "Malta", 239 + "Monaco", 240 + "Oslo", 241 + "Paris", 242 + "Podgorica", 243 + "Prague", 244 + "Rome", 245 + "San Marino", 246 + "Sarajevo", 247 + "Skopje", 248 + "Stockholm", 249 + "Tirane", 250 + "Vaduz", 251 + "Vatican", 252 + "Vienna", 253 + "Warsaw", 254 + "Zagreb", 255 + "Zurich", 256 + "Blantyre", 257 + "Bujumbura", 258 + "Gaborone", 259 + "Harare", 260 + "Johannesburg", 261 + "Juba", 262 + "Kaliningrad", 263 + "Khartoum", 264 + "Kigali", 265 + "Lubumbashi", 266 + "Lusaka", 267 + "Maputo", 268 + "Maseru", 269 + "Mbabane", 270 + "Tripoli", 271 + "Windhoek", 272 + "Jerusalem", 273 + "Tel Aviv", 274 + "Chisinau", 275 + "Tiraspol", 276 + "Athens", 277 + "Bucharest", 278 + "Famagusta", 279 + "Helsinki", 280 + "Kiev", 281 + "Kyiv", 282 + "Mariehamn", 283 + "Nicosia", 284 + "Riga", 285 + "Sofia", 286 + "Tallinn", 287 + "Uzhgorod", 288 + "Vilnius", 289 + "Zaporozhye", 290 + "Cairo", 291 + "Gaza", 292 + "Hebron", 293 + "Beirut", 294 + "Addis Ababa", 295 + "Aden", 296 + "Amman", 297 + "Antananarivo", 298 + "Asmara", 299 + "Asmera", 300 + "Baghdad", 301 + "Bahrain", 302 + "Comoro", 303 + "Damascus", 304 + "Dar es Salaam", 305 + "Djibouti", 306 + "Istanbul", 307 + "Kampala", 308 + "Kirov", 309 + "Kuwait", 310 + "Mayotte", 311 + "Minsk", 312 + "Mogadishu", 313 + "Moscow", 314 + "Nairobi", 315 + "Qatar", 316 + "Riyadh", 317 + "Simferopol", 318 + "Syowa", 319 + "Volgograd", 320 + "Tehran", 321 + "Astrakhan", 322 + "Baku", 323 + "Dubai", 324 + "Mahe", 325 + "Mauritius", 326 + "Muscat", 327 + "Reunion", 328 + "Samara", 329 + "Saratov", 330 + "Tbilisi", 331 + "Ulyanovsk", 332 + "Yerevan", 333 + "Kabul", 334 + "Almaty", 335 + "Aqtau", 336 + "Aqtobe", 337 + "Ashgabat", 338 + "Ashkhabad", 339 + "Atyrau", 340 + "Dushanbe", 341 + "Karachi", 342 + "Kerguelen", 343 + "Maldives", 344 + "Mawson", 345 + "Oral", 346 + "Qostanay", 347 + "Qyzylorda", 348 + "Samarkand", 349 + "Tashkent", 350 + "Vostok", 351 + "Yekaterinburg", 352 + "Calcutta", 353 + "Colombo", 354 + "Kolkata", 355 + "Kathmandu", 356 + "Katmandu", 357 + "Bishkek", 358 + "Chagos", 359 + "Dacca", 360 + "Dhaka", 361 + "Kashgar", 362 + "Omsk", 363 + "Thimbu", 364 + "Thimphu", 365 + "Urumqi", 366 + "Cocos", 367 + "Rangoon", 368 + "Yangon", 369 + "Bangkok", 370 + "Barnaul", 371 + "Christmas", 372 + "Davis", 373 + "Ho Chi Minh", 374 + "Hovd", 375 + "Jakarta", 376 + "Krasnoyarsk", 377 + "Novokuznetsk", 378 + "Novosibirsk", 379 + "Phnom Penh", 380 + "Pontianak", 381 + "Saigon", 382 + "Tomsk", 383 + "Vientiane", 384 + "Brunei", 385 + "Casey", 386 + "Choibalsan", 387 + "Chongqing", 388 + "Chungking", 389 + "Harbin", 390 + "Hong Kong", 391 + "Irkutsk", 392 + "Kuala Lumpur", 393 + "Kuching", 394 + "Macao", 395 + "Macau", 396 + "Makassar", 397 + "Manila", 398 + "Perth", 399 + "Shanghai", 400 + "Singapore", 401 + "Taipei", 402 + "Ujung Pandang", 403 + "Ulaanbaatar", 404 + "Ulan Bator", 405 + "Eucla", 406 + "Chita", 407 + "Dili", 408 + "Jayapura", 409 + "Khandyga", 410 + "Palau", 411 + "Pyongyang", 412 + "Seoul", 413 + "Tokyo", 414 + "Yakutsk", 415 + "Darwin", 416 + "Adelaide", 417 + "Broken Hill", 418 + "Yancowinna", 419 + "Brisbane", 420 + "Chuuk", 421 + "DumontDUrville", 422 + "Guam", 423 + "Lindeman", 424 + "Port Moresby", 425 + "Saipan", 426 + "Truk", 427 + "Ust-Nera", 428 + "Vladivostok", 429 + "Canberra", 430 + "Currie", 431 + "Hobart", 432 + "Macquarie", 433 + "Melbourne", 434 + "Sydney", 435 + "LHI", 436 + "Lord Howe", 437 + "Bougainville", 438 + "Efate", 439 + "Guadalcanal", 440 + "Kosrae", 441 + "Magadan", 442 + "Noumea", 443 + "Pohnpei", 444 + "Ponape", 445 + "Sakhalin", 446 + "Srednekolymsk", 447 + "Norfolk", 448 + "Anadyr", 449 + "Fiji", 450 + "Funafuti", 451 + "Kamchatka", 452 + "Kwajalein", 453 + "Majuro", 454 + "Nauru", 455 + "Tarawa", 456 + "Wake", 457 + "Wallis", 458 + "Auckland", 459 + "McMurdo", 460 + "Chatham", 461 + "Apia", 462 + "Enderbury", 463 + "Fakaofo", 464 + "Tongatapu", 465 + "Kiritimati", 466 + }; 11 467 12 - // Holds offset info and points to an array of names 13 468 typedef struct { 14 - float std_offset_hours; // Offset during standard time 15 - float dst_offset_hours; // Offset during daylight time (if applicable) 16 - int64_t dst_start_utc; // UTC timestamp (time_t) for DST start (0 if N/A) 17 - int64_t dst_end_utc; // UTC timestamp (time_t) for DST end (0 if N/A) 18 - const TzCityName* names; // Pointer to the array of names 19 - int name_count; // How many names are in the array 469 + float std_offset_hours; 470 + float dst_offset_hours; 471 + int64_t dst_start_utc; 472 + int64_t dst_end_utc; 473 + int name_offset; 474 + int name_count; 20 475 } TzInfo; 21 476 22 - static const TzCityName tz_names_0[] = { 23 - { "Midway" }, 24 - { "Niue" }, 25 - { "Pago Pago" }, 26 - }; 27 - 28 - static const TzCityName tz_names_1[] = { 29 - { "Honolulu" }, 30 - { "Johnston" }, 31 - { "Rarotonga" }, 32 - { "Tahiti" }, 33 - }; 34 - 35 - static const TzCityName tz_names_2[] = { 36 - { "Adak" }, 37 - { "Atka" }, 38 - }; 39 - 40 - static const TzCityName tz_names_3[] = { 41 - { "Marquesas" }, 42 - }; 43 - 44 - static const TzCityName tz_names_4[] = { 45 - { "Gambier" }, 46 - }; 47 - 48 - static const TzCityName tz_names_5[] = { 49 - { "Anchorage" }, 50 - { "Juneau" }, 51 - { "Metlakatla" }, 52 - { "Nome" }, 53 - { "Sitka" }, 54 - { "Yakutat" }, 55 - }; 56 - 57 - static const TzCityName tz_names_6[] = { 58 - { "Pitcairn" }, 59 - }; 60 - 61 - static const TzCityName tz_names_7[] = { 62 - { "BajaNorte" }, 63 - { "Ensenada" }, 64 - { "Los Angeles" }, 65 - { "Santa Isabel" }, 66 - { "Tijuana" }, 67 - { "Vancouver" }, 68 - }; 69 - 70 - static const TzCityName tz_names_8[] = { 71 - { "BajaSur" }, 72 - { "Creston" }, 73 - { "Dawson" }, 74 - { "Dawson Creek" }, 75 - { "Fort Nelson" }, 76 - { "Hermosillo" }, 77 - { "Mazatlan" }, 78 - { "Phoenix" }, 79 - { "Whitehorse" }, 80 - }; 81 - 82 - static const TzCityName tz_names_9[] = { 83 - { "Boise" }, 84 - { "Cambridge Bay" }, 85 - { "Ciudad Juarez" }, 86 - { "Denver" }, 87 - { "Edmonton" }, 88 - { "Inuvik" }, 89 - { "Shiprock" }, 90 - { "Yellowknife" }, 91 - }; 92 - 93 - static const TzCityName tz_names_10[] = { 94 - { "Bahia Banderas" }, 95 - { "Belize" }, 96 - { "Chihuahua" }, 97 - { "Costa Rica" }, 98 - { "El Salvador" }, 99 - { "Galapagos" }, 100 - { "Guatemala" }, 101 - { "Managua" }, 102 - { "Merida" }, 103 - { "Mexico City" }, 104 - { "Monterrey" }, 105 - { "Regina" }, 106 - { "Swift Current" }, 107 - { "Tegucigalpa" }, 108 - }; 109 - 110 - static const TzCityName tz_names_11[] = { 111 - { "Beulah" }, 112 - { "Center" }, 113 - { "Chicago" }, 114 - { "Indiana-Starke" }, 115 - { "Knox" }, 116 - { "Matamoros" }, 117 - { "Menominee" }, 118 - { "New Salem" }, 119 - { "Ojinaga" }, 120 - { "Rainy River" }, 121 - { "Rankin Inlet" }, 122 - { "Resolute" }, 123 - { "Tell City" }, 124 - { "Winnipeg" }, 125 - }; 126 - 127 - static const TzCityName tz_names_12[] = { 128 - { "Easter" }, 129 - }; 130 - 131 - static const TzCityName tz_names_13[] = { 132 - { "Atikokan" }, 133 - { "Bogota" }, 134 - { "Cancun" }, 135 - { "Cayman" }, 136 - { "Coral Harbour" }, 137 - { "Eirunepe" }, 138 - { "Guayaquil" }, 139 - { "Lima" }, 140 - { "Panama" }, 141 - { "Porto Acre" }, 142 - { "Rio Branco" }, 143 - }; 144 - 145 - static const TzCityName tz_names_14[] = { 146 - { "Detroit" }, 147 - { "Fort Wayne" }, 148 - { "Grand Turk" }, 149 - { "Indianapolis" }, 150 - { "Iqaluit" }, 151 - { "Louisville" }, 152 - { "Marengo" }, 153 - { "Monticello" }, 154 - { "Montreal" }, 155 - { "Nassau" }, 156 - { "New York" }, 157 - { "Nipigon" }, 158 - { "Pangnirtung" }, 159 - { "Petersburg" }, 160 - { "Port-au-Prince" }, 161 - { "Thunder Bay" }, 162 - { "Toronto" }, 163 - { "Vevay" }, 164 - { "Vincennes" }, 165 - { "Winamac" }, 166 - }; 167 - 168 - static const TzCityName tz_names_15[] = { 169 - { "Havana" }, 170 - }; 171 - 172 - static const TzCityName tz_names_16[] = { 173 - { "Anguilla" }, 174 - { "Antigua" }, 175 - { "Aruba" }, 176 - { "Barbados" }, 177 - { "Blanc-Sablon" }, 178 - { "Boa Vista" }, 179 - { "Campo Grande" }, 180 - { "Caracas" }, 181 - { "Cuiaba" }, 182 - { "Curacao" }, 183 - { "Dominica" }, 184 - { "Grenada" }, 185 - { "Guadeloupe" }, 186 - { "Guyana" }, 187 - { "Kralendijk" }, 188 - { "La Paz" }, 189 - { "Lower Princes" }, 190 - { "Manaus" }, 191 - { "Marigot" }, 192 - { "Martinique" }, 193 - { "Montserrat" }, 194 - { "Port of Spain" }, 195 - { "Porto Velho" }, 196 - { "Puerto Rico" }, 197 - { "Santo Domingo" }, 198 - { "St Barthelemy" }, 199 - { "St Kitts" }, 200 - { "St Lucia" }, 201 - { "St Thomas" }, 202 - { "St Vincent" }, 203 - { "Tortola" }, 204 - { "Virgin" }, 205 - }; 206 - 207 - static const TzCityName tz_names_17[] = { 208 - { "Bermuda" }, 209 - { "Glace Bay" }, 210 - { "Goose Bay" }, 211 - { "Halifax" }, 212 - { "Moncton" }, 213 - { "Thule" }, 214 - }; 215 - 216 - static const TzCityName tz_names_18[] = { 217 - { "Santiago" }, 218 - }; 219 - 220 - static const TzCityName tz_names_19[] = { 221 - { "St Johns" }, 222 - }; 223 - 224 - static const TzCityName tz_names_20[] = { 225 - { "Araguaina" }, 226 - { "Asuncion" }, 227 - { "Belem" }, 228 - { "Buenos Aires" }, 229 - { "Catamarca" }, 230 - { "Cayenne" }, 231 - { "ComodRivadavia" }, 232 - { "Cordoba" }, 233 - { "Fortaleza" }, 234 - { "Jujuy" }, 235 - { "La Rioja" }, 236 - { "Maceio" }, 237 - { "Mendoza" }, 238 - { "Montevideo" }, 239 - { "Palmer" }, 240 - { "Paramaribo" }, 241 - { "Punta Arenas" }, 242 - { "Recife" }, 243 - { "Rio Gallegos" }, 244 - { "Rosario" }, 245 - { "Rothera" }, 246 - { "Salta" }, 247 - { "San Juan" }, 248 - { "San Luis" }, 249 - { "Santarem" }, 250 - { "Sao Paulo" }, 251 - { "Stanley" }, 252 - { "Tucuman" }, 253 - { "Ushuaia" }, 254 - }; 255 - 256 - static const TzCityName tz_names_21[] = { 257 - { "Miquelon" }, 258 - }; 259 - 260 - static const TzCityName tz_names_22[] = { 261 - { "DeNoronha" }, 262 - }; 263 - 264 - static const TzCityName tz_names_23[] = { 265 - { "Godthab" }, 266 - { "Nuuk" }, 267 - { "Scoresbysund" }, 268 - }; 269 - 270 - static const TzCityName tz_names_24[] = { 271 - { "Cape Verde" }, 272 - }; 273 - 274 - static const TzCityName tz_names_25[] = { 275 - { "Azores" }, 276 - }; 277 - 278 - static const TzCityName tz_names_26[] = { 279 - { "Abidjan" }, 280 - { "Accra" }, 281 - { "Bamako" }, 282 - { "Banjul" }, 283 - { "Bissau" }, 284 - { "Conakry" }, 285 - { "Dakar" }, 286 - { "Danmarkshavn" }, 287 - { "Freetown" }, 288 - { "Lome" }, 289 - { "Monrovia" }, 290 - { "Nouakchott" }, 291 - { "Ouagadougou" }, 292 - { "Reykjavik" }, 293 - { "Sao Tome" }, 294 - { "St Helena" }, 295 - { "Timbuktu" }, 296 - }; 297 - 298 - static const TzCityName tz_names_27[] = { 299 - { "Belfast" }, 300 - { "Dublin" }, 301 - { "Lisbon" }, 302 - { "London" }, 303 - }; 304 - 305 - static const TzCityName tz_names_28[] = { 306 - { "Casablanca" }, 307 - { "El Aaiun" }, 308 - }; 309 - 310 - static const TzCityName tz_names_29[] = { 311 - { "Troll" }, 312 - }; 313 - 314 - static const TzCityName tz_names_30[] = { 315 - { "Algiers" }, 316 - { "Bangui" }, 317 - { "Brazzaville" }, 318 - { "Douala" }, 319 - { "Kinshasa" }, 320 - { "Lagos" }, 321 - { "Libreville" }, 322 - { "Luanda" }, 323 - { "Malabo" }, 324 - { "Ndjamena" }, 325 - { "Niamey" }, 326 - { "Porto-Novo" }, 327 - { "Tunis" }, 328 - }; 329 - 330 - static const TzCityName tz_names_31[] = { 331 - { "Amsterdam" }, 332 - { "Andorra" }, 333 - { "Belgrade" }, 334 - { "Berlin" }, 335 - { "Bratislava" }, 336 - { "Brussels" }, 337 - { "Budapest" }, 338 - { "Busingen" }, 339 - { "Ceuta" }, 340 - { "Copenhagen" }, 341 - { "Gibraltar" }, 342 - { "Ljubljana" }, 343 - { "Longyearbyen" }, 344 - { "Luxembourg" }, 345 - { "Madrid" }, 346 - { "Malta" }, 347 - { "Monaco" }, 348 - { "Oslo" }, 349 - { "Paris" }, 350 - { "Podgorica" }, 351 - { "Prague" }, 352 - { "Rome" }, 353 - { "San Marino" }, 354 - { "Sarajevo" }, 355 - { "Skopje" }, 356 - { "Stockholm" }, 357 - { "Tirane" }, 358 - { "Vaduz" }, 359 - { "Vatican" }, 360 - { "Vienna" }, 361 - { "Warsaw" }, 362 - { "Zagreb" }, 363 - { "Zurich" }, 364 - }; 365 - 366 - static const TzCityName tz_names_32[] = { 367 - { "Blantyre" }, 368 - { "Bujumbura" }, 369 - { "Gaborone" }, 370 - { "Harare" }, 371 - { "Johannesburg" }, 372 - { "Juba" }, 373 - { "Kaliningrad" }, 374 - { "Khartoum" }, 375 - { "Kigali" }, 376 - { "Lubumbashi" }, 377 - { "Lusaka" }, 378 - { "Maputo" }, 379 - { "Maseru" }, 380 - { "Mbabane" }, 381 - { "Tripoli" }, 382 - { "Windhoek" }, 383 - }; 384 - 385 - static const TzCityName tz_names_33[] = { 386 - { "Jerusalem" }, 387 - { "Tel Aviv" }, 388 - }; 389 - 390 - static const TzCityName tz_names_34[] = { 391 - { "Athens" }, 392 - { "Bucharest" }, 393 - { "Famagusta" }, 394 - { "Helsinki" }, 395 - { "Kiev" }, 396 - { "Kyiv" }, 397 - { "Mariehamn" }, 398 - { "Nicosia" }, 399 - { "Riga" }, 400 - { "Sofia" }, 401 - { "Tallinn" }, 402 - { "Uzhgorod" }, 403 - { "Vilnius" }, 404 - { "Zaporozhye" }, 405 - }; 406 - 407 - static const TzCityName tz_names_35[] = { 408 - { "Gaza" }, 409 - { "Hebron" }, 410 - }; 411 - 412 - static const TzCityName tz_names_36[] = { 413 - { "Cairo" }, 414 - }; 415 - 416 - static const TzCityName tz_names_37[] = { 417 - { "Chisinau" }, 418 - { "Tiraspol" }, 419 - }; 420 - 421 - static const TzCityName tz_names_38[] = { 422 - { "Beirut" }, 423 - }; 424 - 425 - static const TzCityName tz_names_39[] = { 426 - { "Addis Ababa" }, 427 - { "Aden" }, 428 - { "Amman" }, 429 - { "Antananarivo" }, 430 - { "Asmara" }, 431 - { "Asmera" }, 432 - { "Baghdad" }, 433 - { "Bahrain" }, 434 - { "Comoro" }, 435 - { "Damascus" }, 436 - { "Dar es Salaam" }, 437 - { "Djibouti" }, 438 - { "Istanbul" }, 439 - { "Kampala" }, 440 - { "Kirov" }, 441 - { "Kuwait" }, 442 - { "Mayotte" }, 443 - { "Minsk" }, 444 - { "Mogadishu" }, 445 - { "Moscow" }, 446 - { "Nairobi" }, 447 - { "Qatar" }, 448 - { "Riyadh" }, 449 - { "Simferopol" }, 450 - { "Syowa" }, 451 - { "Volgograd" }, 452 - }; 453 - 454 - static const TzCityName tz_names_40[] = { 455 - { "Tehran" }, 456 - }; 457 - 458 - static const TzCityName tz_names_41[] = { 459 - { "Astrakhan" }, 460 - { "Baku" }, 461 - { "Dubai" }, 462 - { "Mahe" }, 463 - { "Mauritius" }, 464 - { "Muscat" }, 465 - { "Reunion" }, 466 - { "Samara" }, 467 - { "Saratov" }, 468 - { "Tbilisi" }, 469 - { "Ulyanovsk" }, 470 - { "Yerevan" }, 471 - }; 472 - 473 - static const TzCityName tz_names_42[] = { 474 - { "Kabul" }, 475 - }; 476 - 477 - static const TzCityName tz_names_43[] = { 478 - { "Almaty" }, 479 - { "Aqtau" }, 480 - { "Aqtobe" }, 481 - { "Ashgabat" }, 482 - { "Ashkhabad" }, 483 - { "Atyrau" }, 484 - { "Dushanbe" }, 485 - { "Karachi" }, 486 - { "Kerguelen" }, 487 - { "Maldives" }, 488 - { "Mawson" }, 489 - { "Oral" }, 490 - { "Qostanay" }, 491 - { "Qyzylorda" }, 492 - { "Samarkand" }, 493 - { "Tashkent" }, 494 - { "Vostok" }, 495 - { "Yekaterinburg" }, 496 - }; 497 - 498 - static const TzCityName tz_names_44[] = { 499 - { "Calcutta" }, 500 - { "Colombo" }, 501 - { "Kolkata" }, 502 - }; 503 - 504 - static const TzCityName tz_names_45[] = { 505 - { "Kathmandu" }, 506 - { "Katmandu" }, 507 - }; 508 - 509 - static const TzCityName tz_names_46[] = { 510 - { "Bishkek" }, 511 - { "Chagos" }, 512 - { "Dacca" }, 513 - { "Dhaka" }, 514 - { "Kashgar" }, 515 - { "Omsk" }, 516 - { "Thimbu" }, 517 - { "Thimphu" }, 518 - { "Urumqi" }, 519 - }; 520 - 521 - static const TzCityName tz_names_47[] = { 522 - { "Cocos" }, 523 - { "Rangoon" }, 524 - { "Yangon" }, 525 - }; 526 - 527 - static const TzCityName tz_names_48[] = { 528 - { "Bangkok" }, 529 - { "Barnaul" }, 530 - { "Christmas" }, 531 - { "Davis" }, 532 - { "Ho Chi Minh" }, 533 - { "Hovd" }, 534 - { "Jakarta" }, 535 - { "Krasnoyarsk" }, 536 - { "Novokuznetsk" }, 537 - { "Novosibirsk" }, 538 - { "Phnom Penh" }, 539 - { "Pontianak" }, 540 - { "Saigon" }, 541 - { "Tomsk" }, 542 - { "Vientiane" }, 543 - }; 544 - 545 - static const TzCityName tz_names_49[] = { 546 - { "Brunei" }, 547 - { "Casey" }, 548 - { "Choibalsan" }, 549 - { "Chongqing" }, 550 - { "Chungking" }, 551 - { "Harbin" }, 552 - { "Hong Kong" }, 553 - { "Irkutsk" }, 554 - { "Kuala Lumpur" }, 555 - { "Kuching" }, 556 - { "Macao" }, 557 - { "Macau" }, 558 - { "Makassar" }, 559 - { "Manila" }, 560 - { "Perth" }, 561 - { "Shanghai" }, 562 - { "Singapore" }, 563 - { "Taipei" }, 564 - { "Ujung Pandang" }, 565 - { "Ulaanbaatar" }, 566 - { "Ulan Bator" }, 567 - }; 568 - 569 - static const TzCityName tz_names_50[] = { 570 - { "Eucla" }, 571 - }; 572 - 573 - static const TzCityName tz_names_51[] = { 574 - { "Chita" }, 575 - { "Dili" }, 576 - { "Jayapura" }, 577 - { "Khandyga" }, 578 - { "Palau" }, 579 - { "Pyongyang" }, 580 - { "Seoul" }, 581 - { "Tokyo" }, 582 - { "Yakutsk" }, 583 - }; 584 - 585 - static const TzCityName tz_names_52[] = { 586 - { "Darwin" }, 587 - }; 588 - 589 - static const TzCityName tz_names_53[] = { 590 - { "Adelaide" }, 591 - { "Broken Hill" }, 592 - { "Yancowinna" }, 593 - }; 594 - 595 - static const TzCityName tz_names_54[] = { 596 - { "Brisbane" }, 597 - { "Chuuk" }, 598 - { "DumontDUrville" }, 599 - { "Guam" }, 600 - { "Lindeman" }, 601 - { "Port Moresby" }, 602 - { "Saipan" }, 603 - { "Truk" }, 604 - { "Ust-Nera" }, 605 - { "Vladivostok" }, 606 - }; 607 - 608 - static const TzCityName tz_names_55[] = { 609 - { "Canberra" }, 610 - { "Currie" }, 611 - { "Hobart" }, 612 - { "Macquarie" }, 613 - { "Melbourne" }, 614 - { "Sydney" }, 615 - }; 616 - 617 - static const TzCityName tz_names_56[] = { 618 - { "LHI" }, 619 - { "Lord Howe" }, 620 - }; 621 - 622 - static const TzCityName tz_names_57[] = { 623 - { "Bougainville" }, 624 - { "Efate" }, 625 - { "Guadalcanal" }, 626 - { "Kosrae" }, 627 - { "Magadan" }, 628 - { "Noumea" }, 629 - { "Pohnpei" }, 630 - { "Ponape" }, 631 - { "Sakhalin" }, 632 - { "Srednekolymsk" }, 633 - }; 634 - 635 - static const TzCityName tz_names_58[] = { 636 - { "Norfolk" }, 637 - }; 638 - 639 - static const TzCityName tz_names_59[] = { 640 - { "Anadyr" }, 641 - { "Fiji" }, 642 - { "Funafuti" }, 643 - { "Kamchatka" }, 644 - { "Kwajalein" }, 645 - { "Majuro" }, 646 - { "Nauru" }, 647 - { "Tarawa" }, 648 - { "Wake" }, 649 - { "Wallis" }, 650 - }; 651 - 652 - static const TzCityName tz_names_60[] = { 653 - { "Auckland" }, 654 - { "McMurdo" }, 655 - }; 656 - 657 - static const TzCityName tz_names_61[] = { 658 - { "Chatham" }, 659 - }; 660 - 661 - static const TzCityName tz_names_62[] = { 662 - { "Apia" }, 663 - { "Enderbury" }, 664 - { "Fakaofo" }, 665 - { "Tongatapu" }, 666 - }; 667 - 668 - static const TzCityName tz_names_63[] = { 669 - { "Kiritimati" }, 670 - }; 671 - 672 - // Main list mapping offsets/DST info to their respective name arrays 673 477 static const TzInfo tz_list[] = { 674 - { -11.00f, -11.00f, 0LL, 0LL, tz_names_0, 3 }, 675 - { -10.00f, -10.00f, 0LL, 0LL, tz_names_1, 4 }, 676 - { -10.00f, -9.00f, 1741489200LL, 1762048800LL, tz_names_2, 2 }, 677 - { -9.50f, -9.50f, 0LL, 0LL, tz_names_3, 1 }, 678 - { -9.00f, -9.00f, 0LL, 0LL, tz_names_4, 1 }, 679 - { -9.00f, -8.00f, 1741489200LL, 1762048800LL, tz_names_5, 6 }, 680 - { -8.00f, -8.00f, 0LL, 0LL, tz_names_6, 1 }, 681 - { -8.00f, -7.00f, 1741489200LL, 1762048800LL, tz_names_7, 6 }, 682 - { -7.00f, -7.00f, 0LL, 0LL, tz_names_8, 9 }, 683 - { -7.00f, -6.00f, 1741489200LL, 1762048800LL, tz_names_9, 8 }, 684 - { -6.00f, -6.00f, 0LL, 0LL, tz_names_10, 14 }, 685 - { -6.00f, -5.00f, 1741489200LL, 1762048800LL, tz_names_11, 14 }, 686 - { -6.00f, -5.00f, 1757199600LL, 1743890400LL, tz_names_12, 1 }, 687 - { -5.00f, -5.00f, 0LL, 0LL, tz_names_13, 11 }, 688 - { -5.00f, -4.00f, 1741489200LL, 1762048800LL, tz_names_14, 20 }, 689 - { -5.00f, -4.00f, 1741482000LL, 1762045200LL, tz_names_15, 1 }, 690 - { -4.00f, -4.00f, 0LL, 0LL, tz_names_16, 32 }, 691 - { -4.00f, -3.00f, 1741489200LL, 1762048800LL, tz_names_17, 6 }, 692 - { -4.00f, -3.00f, 1757206800LL, 1743897600LL, tz_names_18, 1 }, 693 - { -3.50f, -2.50f, 1741489200LL, 1762048800LL, tz_names_19, 1 }, 694 - { -3.00f, -3.00f, 0LL, 0LL, tz_names_20, 29 }, 695 - { -3.00f, -2.00f, 1741489200LL, 1762048800LL, tz_names_21, 1 }, 696 - { -2.00f, -2.00f, 0LL, 0LL, tz_names_22, 1 }, 697 - { -2.00f, -1.00f, 1743292800LL, 1761436800LL, tz_names_23, 3 }, 698 - { -1.00f, -1.00f, 0LL, 0LL, tz_names_24, 1 }, 699 - { -1.00f, 0.00f, 1743296400LL, 1761440400LL, tz_names_25, 1 }, 700 - { 0.00f, 0.00f, 0LL, 0LL, tz_names_26, 17 }, 701 - { 0.00f, 1.00f, 1743300000LL, 1761444000LL, tz_names_27, 4 }, 702 - { 0.00f, 1.00f, 1743908400LL, 1740279600LL, tz_names_28, 2 }, 703 - { 0.00f, 2.00f, 1743303600LL, 1761447600LL, tz_names_29, 1 }, 704 - { 1.00f, 1.00f, 0LL, 0LL, tz_names_30, 13 }, 705 - { 1.00f, 2.00f, 1743303600LL, 1761447600LL, tz_names_31, 33 }, 706 - { 2.00f, 2.00f, 0LL, 0LL, tz_names_32, 16 }, 707 - { 2.00f, 3.00f, 1743130800LL, 1761444000LL, tz_names_33, 2 }, 708 - { 2.00f, 3.00f, 1743307200LL, 1761451200LL, tz_names_34, 14 }, 709 - { 2.00f, 3.00f, 1744426800LL, 1761357600LL, tz_names_35, 2 }, 710 - { 2.00f, 3.00f, 1745542800LL, 1761868800LL, tz_names_36, 1 }, 711 - { 2.00f, 3.00f, 1743303600LL, 1761447600LL, tz_names_37, 2 }, 712 - { 2.00f, 3.00f, 1743296400LL, 1761436800LL, tz_names_38, 1 }, 713 - { 3.00f, 3.00f, 0LL, 0LL, tz_names_39, 26 }, 714 - { 3.50f, 3.50f, 0LL, 0LL, tz_names_40, 1 }, 715 - { 4.00f, 4.00f, 0LL, 0LL, tz_names_41, 12 }, 716 - { 4.50f, 4.50f, 0LL, 0LL, tz_names_42, 1 }, 717 - { 5.00f, 5.00f, 0LL, 0LL, tz_names_43, 18 }, 718 - { 5.50f, 5.50f, 0LL, 0LL, tz_names_44, 3 }, 719 - { 5.75f, 5.75f, 0LL, 0LL, tz_names_45, 2 }, 720 - { 6.00f, 6.00f, 0LL, 0LL, tz_names_46, 9 }, 721 - { 6.50f, 6.50f, 0LL, 0LL, tz_names_47, 3 }, 722 - { 7.00f, 7.00f, 0LL, 0LL, tz_names_48, 15 }, 723 - { 8.00f, 8.00f, 0LL, 0LL, tz_names_49, 21 }, 724 - { 8.75f, 8.75f, 0LL, 0LL, tz_names_50, 1 }, 725 - { 9.00f, 9.00f, 0LL, 0LL, tz_names_51, 9 }, 726 - { 9.50f, 9.50f, 0LL, 0LL, tz_names_52, 1 }, 727 - { 9.50f, 10.50f, 1759633200LL, 1743908400LL, tz_names_53, 3 }, 728 - { 10.00f, 10.00f, 0LL, 0LL, tz_names_54, 10 }, 729 - { 10.00f, 11.00f, 1759633200LL, 1743908400LL, tz_names_55, 6 }, 730 - { 10.50f, 11.00f, 1759633200LL, 1743904800LL, tz_names_56, 2 }, 731 - { 11.00f, 11.00f, 0LL, 0LL, tz_names_57, 10 }, 732 - { 11.00f, 12.00f, 1759633200LL, 1743908400LL, tz_names_58, 1 }, 733 - { 12.00f, 12.00f, 0LL, 0LL, tz_names_59, 10 }, 734 - { 12.00f, 13.00f, 1759028400LL, 1743908400LL, tz_names_60, 2 }, 735 - { 12.75f, 13.75f, 1759032000LL, 1743912000LL, tz_names_61, 1 }, 736 - { 13.00f, 13.00f, 0LL, 0LL, tz_names_62, 4 }, 737 - { 14.00f, 14.00f, 0LL, 0LL, tz_names_63, 1 }, 478 + { -11.00f, -11.00f, 0LL, 0LL, 0, 3 }, 479 + { -10.00f, -10.00f, 0LL, 0LL, 3, 4 }, 480 + { -10.00f, -9.00f, 1741489200LL, 1762048800LL, 7, 2 }, 481 + { -9.50f, -9.50f, 0LL, 0LL, 9, 1 }, 482 + { -9.00f, -9.00f, 0LL, 0LL, 10, 1 }, 483 + { -9.00f, -8.00f, 1741489200LL, 1762048800LL, 11, 6 }, 484 + { -8.00f, -8.00f, 0LL, 0LL, 17, 1 }, 485 + { -8.00f, -7.00f, 1741489200LL, 1762048800LL, 18, 6 }, 486 + { -7.00f, -7.00f, 0LL, 0LL, 24, 9 }, 487 + { -7.00f, -6.00f, 1741489200LL, 1762048800LL, 33, 8 }, 488 + { -6.00f, -6.00f, 0LL, 0LL, 41, 14 }, 489 + { -6.00f, -5.00f, 1741489200LL, 1762048800LL, 55, 14 }, 490 + { -6.00f, -5.00f, 1757199600LL, 1743890400LL, 69, 1 }, 491 + { -5.00f, -5.00f, 0LL, 0LL, 70, 11 }, 492 + { -5.00f, -4.00f, 1741482000LL, 1762045200LL, 81, 1 }, 493 + { -5.00f, -4.00f, 1741489200LL, 1762048800LL, 82, 20 }, 494 + { -4.00f, -4.00f, 0LL, 0LL, 102, 32 }, 495 + { -4.00f, -3.00f, 1741489200LL, 1762048800LL, 134, 6 }, 496 + { -4.00f, -3.00f, 1757206800LL, 1743897600LL, 140, 1 }, 497 + { -3.50f, -2.50f, 1741489200LL, 1762048800LL, 141, 1 }, 498 + { -3.00f, -3.00f, 0LL, 0LL, 142, 29 }, 499 + { -3.00f, -2.00f, 1741489200LL, 1762048800LL, 171, 1 }, 500 + { -2.00f, -2.00f, 0LL, 0LL, 172, 1 }, 501 + { -2.00f, -1.00f, 1743292800LL, 1761436800LL, 173, 3 }, 502 + { -1.00f, -1.00f, 0LL, 0LL, 176, 1 }, 503 + { -1.00f, 0.00f, 1743296400LL, 1761440400LL, 177, 1 }, 504 + { 0.00f, 0.00f, 0LL, 0LL, 178, 17 }, 505 + { 0.00f, 1.00f, 1743908400LL, 1740279600LL, 195, 2 }, 506 + { 0.00f, 1.00f, 1743300000LL, 1761444000LL, 197, 4 }, 507 + { 0.00f, 2.00f, 1743303600LL, 1761447600LL, 201, 1 }, 508 + { 1.00f, 1.00f, 0LL, 0LL, 202, 13 }, 509 + { 1.00f, 2.00f, 1743303600LL, 1761447600LL, 215, 33 }, 510 + { 2.00f, 2.00f, 0LL, 0LL, 248, 16 }, 511 + { 2.00f, 3.00f, 1743130800LL, 1761444000LL, 264, 2 }, 512 + { 2.00f, 3.00f, 1743303600LL, 1761447600LL, 266, 2 }, 513 + { 2.00f, 3.00f, 1743307200LL, 1761451200LL, 268, 14 }, 514 + { 2.00f, 3.00f, 1745542800LL, 1761868800LL, 282, 1 }, 515 + { 2.00f, 3.00f, 1744426800LL, 1761357600LL, 283, 2 }, 516 + { 2.00f, 3.00f, 1743296400LL, 1761436800LL, 285, 1 }, 517 + { 3.00f, 3.00f, 0LL, 0LL, 286, 26 }, 518 + { 3.50f, 3.50f, 0LL, 0LL, 312, 1 }, 519 + { 4.00f, 4.00f, 0LL, 0LL, 313, 12 }, 520 + { 4.50f, 4.50f, 0LL, 0LL, 325, 1 }, 521 + { 5.00f, 5.00f, 0LL, 0LL, 326, 18 }, 522 + { 5.50f, 5.50f, 0LL, 0LL, 344, 3 }, 523 + { 5.75f, 5.75f, 0LL, 0LL, 347, 2 }, 524 + { 6.00f, 6.00f, 0LL, 0LL, 349, 9 }, 525 + { 6.50f, 6.50f, 0LL, 0LL, 358, 3 }, 526 + { 7.00f, 7.00f, 0LL, 0LL, 361, 15 }, 527 + { 8.00f, 8.00f, 0LL, 0LL, 376, 21 }, 528 + { 8.75f, 8.75f, 0LL, 0LL, 397, 1 }, 529 + { 9.00f, 9.00f, 0LL, 0LL, 398, 9 }, 530 + { 9.50f, 9.50f, 0LL, 0LL, 407, 1 }, 531 + { 9.50f, 10.50f, 1759633200LL, 1743908400LL, 408, 3 }, 532 + { 10.00f, 10.00f, 0LL, 0LL, 411, 10 }, 533 + { 10.00f, 11.00f, 1759633200LL, 1743908400LL, 421, 6 }, 534 + { 10.50f, 11.00f, 1759633200LL, 1743904800LL, 427, 2 }, 535 + { 11.00f, 11.00f, 0LL, 0LL, 429, 10 }, 536 + { 11.00f, 12.00f, 1759633200LL, 1743908400LL, 439, 1 }, 537 + { 12.00f, 12.00f, 0LL, 0LL, 440, 10 }, 538 + { 12.00f, 13.00f, 1759028400LL, 1743908400LL, 450, 2 }, 539 + { 12.75f, 13.75f, 1759032000LL, 1743912000LL, 452, 1 }, 540 + { 13.00f, 13.00f, 0LL, 0LL, 453, 4 }, 541 + { 14.00f, 14.00f, 0LL, 0LL, 457, 1 }, 738 542 }; 739 543 740 - #define TZ_LIST_COUNT 64 544 + #define TZ_LIST_COUNT (sizeof(tz_list)/sizeof(tz_list[0])) 545 + #define TZ_NAME_POOL_COUNT (sizeof(tz_name_pool)/sizeof(tz_name_pool[0]))