Commit 6371525
authored
[release/6.0-maui] Android remove backward timezones (#64228)
Fixes #63693
It was discovered that Android produces duplicate TimeZone DisplayNames among all timezone IDs in GetSystemTimeZones. These duplicate DisplayNames occur across TimeZone IDs that are aliases, where all except one are backward timezone IDs.
If a name is changed, put its old spelling in the 'backward' file
From the Android TimeZone data file tzdata, it isn't obvious which TimeZone IDs are backward (I find it strange that they're included in the first place), however we discovered that on some versions of Android, there is an adjacent file tzlookup.xml that can aid us in determining which TimeZone IDs are "current" (not backward).
This PR aims to utilize tzlookup.xml when it exists and post-filter's the Populated TimeZone IDs in the AndroidTzData instance by removing IDs and their associated information (byteoffset and length) from the AndroidTzData instance if it is not found in tzlookup.xml. This is using the assumption that all non-backward TimeZone IDs make it to the tzlookup.xml file.
This PR also adds a new TimeZoneInfo Test to check whether or not there are duplicate DisplayNames in GetSystemTimeZones1 parent 4f567e5 commit 6371525
2 files changed
Lines changed: 97 additions & 9 deletions
File tree
- src/libraries
- System.Private.CoreLib/src/System
- System.Runtime/tests/System
Lines changed: 83 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
233 | | - | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
244 | 296 | | |
245 | 297 | | |
246 | 298 | | |
247 | | - | |
| 299 | + | |
| 300 | + | |
248 | 301 | | |
249 | 302 | | |
250 | 303 | | |
| |||
254 | 307 | | |
255 | 308 | | |
256 | 309 | | |
257 | | - | |
| 310 | + | |
258 | 311 | | |
259 | 312 | | |
260 | 313 | | |
| |||
266 | 319 | | |
267 | 320 | | |
268 | 321 | | |
269 | | - | |
| 322 | + | |
| 323 | + | |
270 | 324 | | |
271 | 325 | | |
272 | 326 | | |
273 | 327 | | |
274 | 328 | | |
275 | 329 | | |
276 | 330 | | |
277 | | - | |
| 331 | + | |
278 | 332 | | |
279 | 333 | | |
280 | 334 | | |
| |||
303 | 357 | | |
304 | 358 | | |
305 | 359 | | |
306 | | - | |
| 360 | + | |
| 361 | + | |
307 | 362 | | |
308 | 363 | | |
309 | 364 | | |
310 | 365 | | |
311 | | - | |
312 | 366 | | |
313 | 367 | | |
314 | 368 | | |
315 | | - | |
| 369 | + | |
| 370 | + | |
316 | 371 | | |
317 | 372 | | |
318 | 373 | | |
319 | 374 | | |
320 | 375 | | |
321 | 376 | | |
322 | 377 | | |
| 378 | + | |
323 | 379 | | |
324 | 380 | | |
325 | 381 | | |
| |||
372 | 428 | | |
373 | 429 | | |
374 | 430 | | |
375 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
376 | 450 | | |
377 | 451 | | |
378 | 452 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2873 | 2873 | | |
2874 | 2874 | | |
2875 | 2875 | | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
2876 | 2890 | | |
2877 | 2891 | | |
2878 | 2892 | | |
| |||
0 commit comments