From 97a7dbfb562f3ace2182feaea996a32a4811b3c9 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 27 Oct 2023 15:05:21 +0200 Subject: [PATCH] Switched to Windows timezone list --- ATTRIBUTION.md | 1 - app/src/main/assets/ATTRIBUTION.md | 1 - app/src/main/assets/tz-mapi-to-ical.txt | 88 ------ app/src/main/assets/windows_timezones.txt | 253 ++++++++++++++++++ .../eu/faircode/email/CalendarHelper.java | 30 ++- .../eu/faircode/email/FragmentMessages.java | 11 +- 6 files changed, 284 insertions(+), 100 deletions(-) delete mode 100644 app/src/main/assets/tz-mapi-to-ical.txt create mode 100644 app/src/main/assets/windows_timezones.txt diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 39cc06cb7a..5e55dbdee6 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -48,4 +48,3 @@ FairEmail uses parts or all of: * [Send](https://github.com/timvisee/send). [Mozilla Public License 2.0](https://github.com/timvisee/send/blob/master/LICENSE). * [DetectHtml](https://github.com/dbennett455/DetectHtml). [The MIT License](https://github.com/dbennett455/DetectHtml/blob/master/LICENSE). * [Liberation Sans Narrow font](https://github.com/liberationfonts/liberation-sans-narrow). Copyright (C) 1989, 1991 Free Software Foundation, Inc. [GNU General Public License version 2 with exceptions](https://fedoraproject.org/wiki/Licensing/LiberationFontLicense). -* [Evolution/MAPIProvider](https://github.com/GNOME/evolution-mapi/). Copyright (C) 1991, 1999 Free Software Foundation, Inc. [GNU Lesser General Public License, version 2.1](https://github.com/GNOME/evolution-mapi/blob/master/COPYING). diff --git a/app/src/main/assets/ATTRIBUTION.md b/app/src/main/assets/ATTRIBUTION.md index 39cc06cb7a..5e55dbdee6 100644 --- a/app/src/main/assets/ATTRIBUTION.md +++ b/app/src/main/assets/ATTRIBUTION.md @@ -48,4 +48,3 @@ FairEmail uses parts or all of: * [Send](https://github.com/timvisee/send). [Mozilla Public License 2.0](https://github.com/timvisee/send/blob/master/LICENSE). * [DetectHtml](https://github.com/dbennett455/DetectHtml). [The MIT License](https://github.com/dbennett455/DetectHtml/blob/master/LICENSE). * [Liberation Sans Narrow font](https://github.com/liberationfonts/liberation-sans-narrow). Copyright (C) 1989, 1991 Free Software Foundation, Inc. [GNU General Public License version 2 with exceptions](https://fedoraproject.org/wiki/Licensing/LiberationFontLicense). -* [Evolution/MAPIProvider](https://github.com/GNOME/evolution-mapi/). Copyright (C) 1991, 1999 Free Software Foundation, Inc. [GNU Lesser General Public License, version 2.1](https://github.com/GNOME/evolution-mapi/blob/master/COPYING). diff --git a/app/src/main/assets/tz-mapi-to-ical.txt b/app/src/main/assets/tz-mapi-to-ical.txt deleted file mode 100644 index 24bbb25bf2..0000000000 --- a/app/src/main/assets/tz-mapi-to-ical.txt +++ /dev/null @@ -1,88 +0,0 @@ -Dateline Standard Time~~~Pacific/Apia -Samoa Standard Time~~~Pacific/Midway -Hawaiian Standard Time~~~Pacific/Honolulu -Alaskan Standard Time~~~America/Anchorage -Pacific Standard Time~~~America/Los_Angeles -Pacific Standard Time (Mexico)~~~America/Tijuana -US Mountain Standard Time~~~America/Phoenix -Mountain Standard Time (Mexico)~~~America/Mazatlan -Mexico Standard Time 2~~~America/Chihuahua -Mountain Standard Time~~~America/Denver -Central America Standard Time~~~America/Costa_Rica -Central Standard Time~~~America/Chicago -Central Standard Time (Mexico)~~~America/Monterrey -Mexico Standard Time~~~America/Mexico_City -Canada Central Standard Time~~~America/Winnipeg -SA Pacific Standard Time~~~America/Bogota -Eastern Standard Time~~~America/New_York -US Eastern Standard Time~~~America/Indiana/Indianapolis -Venezuela Standard Time~~~America/Caracas -Atlantic Standard Time~~~America/Halifax -SA Western Standard Time~~~America/La_Paz -Central Brazilian Standard Time~~~America/Manaus -Pacific SA Standard Time~~~America/La_Paz -Newfoundland Standard Time~~~America/St_Johns -E. South America Standard Time~~~America/Bahia -SA Eastern Standard Time~~~America/Argentina/Buenos_Aires -Greenland Standard Time~~~America/Godthab -Montevideo Standard Time~~~America/Montevideo -Mid-Atlantic Standard Time~~~Atlantic/South_Georgia -Azores Standard Time~~~Atlantic/Azores -Cape Verde Standard Time~~~Atlantic/Cape_Verde -Greenwich Standard Time~~~Africa/Casablanca -GMT Standard Time~~~Europe/Dublin -UTC~~~UTC -W. Europe Standard Time~~~Europe/Berlin -Central Europe Standard Time~~~Europe/Prague -Romance Standard Time~~~Europe/Paris -Central European Standard Time~~~Europe/Belgrade -W. Central Africa Standard Time~~~Africa/Luanda -Jordan Standard Time~~~Asia/Amman -GTB Standard Time~~~Europe/Athens -Middle East Standard Time~~~Asia/Beirut -Egypt Standard Time~~~Africa/Cairo -South Africa Standard Time~~~Africa/Harare -FLE Standard Time~~~Europe/Helsinki -Israel Standard Time~~~Asia/Jerusalem -E. Europe Standard Time~~~Europe/Minsk -Namibia Standard Time~~~Africa/Windhoek -Arabic Standard Time~~~Asia/Baghdad -Arab Standard Time~~~Asia/Qatar -Russian Standard Time~~~Europe/Moscow -E. Africa Standard Time~~~Africa/Nairobi -Georgian Standard Time~~~Asia/Tbilisi -Iran Standard Time~~~Asia/Tehran -Arabian Standard Time~~~Asia/Muscat -Azerbaijan Standard Time~~~Asia/Baku -Caucasus Standard Time~~~Asia/Yerevan -Armenian Standard Time~~~Asia/Yerevan -Afghanistan Standard Time~~~Asia/Kabul -Ekaterinburg Standard Time~~~Asia/Yekaterinburg -West Asia Standard Time~~~Asia/Karachi -India Standard Time~~~Asia/Kolkata -Sri Lanka Standard Time~~~Asia/Colombo -Nepal Standard Time~~~Asia/Kathmandu -N. Central Asia Standard Time~~~Asia/Novosibirsk -Central Asia Standard Time~~~Asia/Dhaka -Myanmar Standard Time~~~Asia/Rangoon -SE Asia Standard Time~~~Asia/Bangkok -North Asia Standard Time~~~Asia/Krasnoyarsk -China Standard Time~~~Asia/Shanghai -North Asia East Standard Time~~~Asia/Ulaanbaatar -Singapore Standard Time~~~Asia/Singapore -W. Australia Standard Time~~~Australia/Perth -Taipei Standard Time~~~Asia/Taipei -Tokyo Standard Time~~~Asia/Tokyo -Korea Standard Time~~~Asia/Seoul -Yakutsk Standard Time~~~Asia/Yakutsk -Cen. Australia Standard Time~~~Australia/Adelaide -AUS Central Standard Time~~~Australia/Darwin -E. Australia Standard Time~~~Australia/Brisbane -AUS Eastern Standard Time~~~Australia/Sydney -West Pacific Standard Time~~~Pacific/Guam -Tasmania Standard Time~~~Australia/Hobart -Vladivostok Standard Time~~~Asia/Vladivostok -Central Pacific Standard Time~~~Asia/Magadan -New Zealand Standard Time~~~Pacific/Auckland -Fiji Standard Time~~~Pacific/Fiji -Tonga Standard Time~~~Pacific/Tongatapu diff --git a/app/src/main/assets/windows_timezones.txt b/app/src/main/assets/windows_timezones.txt new file mode 100644 index 0000000000..884b3f195b --- /dev/null +++ b/app/src/main/assets/windows_timezones.txt @@ -0,0 +1,253 @@ +#Country/Region;ISO3166;Timezone;UTC;Timezone description +Afghanistan;AF;Afghanistan Standard Time;(UTC+04:30);Kabul +Åland Islands;AX;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +Albania;AL;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Algeria;DZ;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +American Samoa;AS;UTC-11;(UTC-11:00);Coordinated Universal Time-11 +Andorra;AD;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Angola;AO;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Anguilla;AI;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Antarctica;AQ;Pacific SA Standard Time;(UTC-03:00);Santiago +Antigua and Barbuda;AG;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Argentina;AR;Argentina Standard Time;(UTC-03:00);City of Buenos Aires +Armenia;AM;Caucasus Standard Time;(UTC+04:00);Yerevan +Aruba;AW;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Australia;AU;AUS Eastern Standard Time;(UTC+10:00);Canberra, Melbourne, Sydney +Austria;AT;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Azerbaijan;AZ;Azerbaijan Standard Time;(UTC+04:00);Baku +Bahamas, The;BS;Eastern Standard Time;(UTC-05:00);Eastern Time (US & Canada) +Bahrain;BH;Arab Standard Time;(UTC+03:00);Kuwait, Riyadh +Bangladesh;BD;Bangladesh Standard Time;(UTC+06:00);Dhaka +Barbados;BB;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Belarus;BY;Belarus Standard Time;(UTC+03:00);Minsk +Belgium;BE;Romance Standard Time;(UTC+01:00);Brussels, Copenhagen, Madrid, Paris +Belize;BZ;Central America Standard Time;(UTC-06:00);Central America +Benin;BJ;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Bermuda;BM;Atlantic Standard Time;(UTC-04:00);Atlantic Time (Canada) +Bhutan;BT;Bangladesh Standard Time;(UTC+06:00);Dhaka +Bolivarian Republic of Venezuela;VE;Venezuela Standard Time;(UTC-04:30);Caracas +Bolivia;BO;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Bonaire, Sint Eustatius and Saba;BQ;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Bosnia and Herzegovina;BA;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Botswana;BW;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Bouvet Island;BV;UTC;(UTC);Coordinated Universal Time +Brazil;BR;E. South America Standard Time;(UTC-03:00);Brasilia +British Indian Ocean Territory;IO;Central Asia Standard Time;(UTC+06:00);Nur-Sultan +Brunei;BN;Singapore Standard Time;(UTC+08:00);Kuala Lumpur, Singapore +Bulgaria;BG;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +Burkina Faso;BF;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Burundi;BI;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Cabo Verde;CV;Cape Verde Standard Time;(UTC-01:00);Cabo Verde Is. +Cambodia;KH;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Cameroon;CM;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Canada;CA;Eastern Standard Time;(UTC-05:00);Eastern Time (US & Canada) +Cayman Islands;KY;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Central African Republic;CF;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Chad;TD;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Chile;CL;Pacific SA Standard Time;(UTC-03:00);Santiago +China;CN;China Standard Time;(UTC+08:00);Beijing, Chongqing, Hong Kong SAR, Urumqi +Christmas Island;CX;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Cocos (Keeling) Islands;CC;Myanmar Standard Time;(UTC+06:30);Yangon (Rangoon) +Colombia;CO;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Comoros;KM;E. Africa Standard Time;(UTC+03:00);Nairobi +Congo;CG;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Congo (DRC);CD;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Cook Islands;CK;Hawaiian Standard Time;(UTC-10:00);Hawaii +Costa Rica;CR;Central America Standard Time;(UTC-06:00);Central America +Côte d'Ivoire;CI;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Croatia;HR;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Cuba;CU;Eastern Standard Time;(UTC-05:00);Eastern Time (US & Canada) +Curaçao;CW;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Cyprus;CY;E. Europe Standard Time;(UTC+02:00);E. Europe +Czech Republic;CZ;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Democratic Republic of Timor-Leste;TL;Tokyo Standard Time;(UTC+09:00);Osaka, Sapporo, Tokyo +Denmark;DK;Romance Standard Time;(UTC+01:00);Brussels, Copenhagen, Madrid, Paris +Djibouti;DJ;E. Africa Standard Time;(UTC+03:00);Nairobi +Dominica;DM;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Dominican Republic;DO;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Ecuador;EC;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Egypt;EG;Egypt Standard Time;(UTC+02:00);Cairo +El Salvador;SV;Central America Standard Time;(UTC-06:00);Central America +Equatorial Guinea;GQ;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Eritrea;ER;E. Africa Standard Time;(UTC+03:00);Nairobi +Estonia;EE;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +Ethiopia;ET;E. Africa Standard Time;(UTC+03:00);Nairobi +Falkland Islands;FK;SA Eastern Standard Time;(UTC-03:00);Cayenne, Fortaleza +Faroe Islands;FO;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Fiji Islands;FJ;Fiji Standard Time;(UTC+12:00);Fiji +Finland;FI;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +France;FR;Romance Standard Time;(UTC+01:00);Brussels, Copenhagen, Madrid, Paris +French Guiana;GF;SA Eastern Standard Time;(UTC-03:00);Cayenne, Fortaleza +French Polynesia;PF;Hawaiian Standard Time;(UTC-10:00);Hawaii +French Southern and Antarctic Lands;TF;West Asia Standard Time;(UTC+05:00);Ashgabat, Tashkent +Gabon;GA;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Gambia, The;GM;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Georgia;GE;Georgian Standard Time;(UTC+04:00);Tbilisi +Germany;DE;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Ghana;GH;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Gibraltar;GI;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Greece;GR;GTB Standard Time;(UTC+02:00);Athens, Bucharest +Greenland;GL;Greenland Standard Time;(UTC-03:00);Greenland +Grenada;GD;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Guadeloupe;GP;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Guam;GU;West Pacific Standard Time;(UTC+10:00);Guam, Port Moresby +Guatemala;GT;Central America Standard Time;(UTC-06:00);Central America +Guernsey;GG;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Guinea;GN;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Guinea-Bissau;GW;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Guyana;GY;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Haiti;HT;Eastern Standard Time;(UTC-05:00);Eastern Time (US & Canada) +Heard Island and McDonald Islands;HM;Mauritius Standard Time;(UTC+04:00);Port Louis +Honduras;HN;Central America Standard Time;(UTC-06:00);Central America +Hong Kong SAR;HK;China Standard Time;(UTC+08:00);Beijing, Chongqing, Hong Kong SAR, Urumqi +Hungary;HU;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Iceland;IS;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +India;IN;India Standard Time;(UTC+05:30);Chennai, Kolkata, Mumbai, New Delhi +Indonesia;ID;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Iran;IR;Iran Standard Time;(UTC+03:30);Tehran +Iraq;IQ;Arabic Standard Time;(UTC+03:00);Baghdad +Ireland;IE;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Israel;IL;Israel Standard Time;(UTC+02:00);Middle East +Italy;IT;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Jamaica;JM;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Jan Mayen;SJ;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Japan;JP;Tokyo Standard Time;(UTC+09:00);Osaka, Sapporo, Tokyo +Jersey;JE;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Jordan;JO;Jordan Standard Time;(UTC+02:00);Amman +Kazakhstan;KZ;Central Asia Standard Time;(UTC+06:00);Nur-Sultan +Kenya;KE;E. Africa Standard Time;(UTC+03:00);Nairobi +Kiribati;KI;UTC+12;(UTC+12:00);Coordinated Universal Time+12 +Korea;KR;Korea Standard Time;(UTC+09:00);Seoul +Kosovo;XK;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Kuwait;KW;Arab Standard Time;(UTC+03:00);Kuwait, Riyadh +Kyrgyzstan;KG;Central Asia Standard Time;(UTC+06:00);Nur-Sultan +Laos;LA;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Latvia;LV;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +Lebanon;LB;Middle East Standard Time;(UTC+02:00);Beirut +Lesotho;LS;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Liberia;LR;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Libya;LY;E. Europe Standard Time;(UTC+02:00);E. Europe +Liechtenstein;LI;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Lithuania;LT;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +Luxembourg;LU;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Macao SAR;MO;China Standard Time;(UTC+08:00);Beijing, Chongqing, Hong Kong SAR, Urumqi +Republic of North Macedonia;MK;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Madagascar;MG;E. Africa Standard Time;(UTC+03:00);Nairobi +Malawi;MW;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Malaysia;MY;Singapore Standard Time;(UTC+08:00);Kuala Lumpur, Singapore +Maldives;MV;West Asia Standard Time;(UTC+05:00);Ashgabat, Tashkent +Mali;ML;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Malta;MT;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Man, Isle of;IM;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Marshall Islands;MH;UTC+12;(UTC+12:00);Coordinated Universal Time+12 +Martinique;MQ;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Mauritania;MR;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Mauritius;MU;Mauritius Standard Time;(UTC+04:00);Port Louis +Mayotte;YT;E. Africa Standard Time;(UTC+03:00);Nairobi +Mexico;MX;Central Standard Time (Mexico);(UTC-06:00);Guadalajara, Mexico City, Monterrey +Micronesia;FM;West Pacific Standard Time;(UTC+10:00);Guam, Port Moresby +Moldova;MD;GTB Standard Time;(UTC+02:00);Athens, Bucharest +Monaco;MC;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Mongolia;MN;Ulaanbaatar Standard Time;(UTC+08:00);Ulaanbaatar +Montenegro;ME;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Montserrat;MS;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Morocco;MA;Morocco Standard Time;(UTC);Casablanca +Mozambique;MZ;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Myanmar;MM;Myanmar Standard Time;(UTC+06:30);Yangon (Rangoon) +Namibia;NA;Namibia Standard Time;(UTC+01:00);Windhoek +Nauru;NR;UTC+12;(UTC+12:00);Coordinated Universal Time+12 +Nepal;NP;Nepal Standard Time;(UTC+05:45);Kathmandu +Netherlands;NL;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +New Caledonia;NC;Central Pacific Standard Time;(UTC+11:00);Solomon Is., New Caledonia +New Zealand;NZ;New Zealand Standard Time;(UTC+12:00);Auckland, Wellington +Nicaragua;NI;Central America Standard Time;(UTC-06:00);Central America +Niger;NE;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Nigeria;NG;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Niue;NU;UTC-11;(UTC-11:00);Coordinated Universal Time-11 +Norfolk Island;NF;Central Pacific Standard Time;(UTC+11:00);Solomon Is., New Caledonia +North Korea;KP;Korea Standard Time;(UTC+09:00);Seoul +Northern Mariana Islands;MP;West Pacific Standard Time;(UTC+10:00);Guam, Port Moresby +Norway;NO;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Oman;OM;Arabian Standard Time;(UTC+04:00);Abu Dhabi, Muscat +Pakistan;PK;Pakistan Standard Time;(UTC+05:00);Islamabad, Karachi +Palau;PW;Tokyo Standard Time;(UTC+09:00);Osaka, Sapporo, Tokyo +Palestinian Authority;PS;Egypt Standard Time;(UTC+02:00);Cairo +Panama;PA;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Papua New Guinea;PG;West Pacific Standard Time;(UTC+10:00);Guam, Port Moresby +Paraguay;PY;Paraguay Standard Time;(UTC-04:00);Asuncion +Peru;PE;SA Pacific Standard Time;(UTC-05:00);Bogota, Lima, Quito, Rio Branco +Philippines;PH;Singapore Standard Time;(UTC+08:00);Kuala Lumpur, Singapore +Pitcairn Islands;PN;Pacific Standard Time;(UTC-08:00);Pacific Time (US & Canada) +Poland;PL;Central European Standard Time;(UTC+01:00);Sarajevo, Skopje, Warsaw, Zagreb +Portugal;PT;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +Puerto Rico;PR;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Qatar;QA;Arab Standard Time;(UTC+03:00);Kuwait, Riyadh +Reunion;RE;Mauritius Standard Time;(UTC+04:00);Port Louis +Romania;RO;GTB Standard Time;(UTC+02:00);Athens, Bucharest +Russia;RU;Russian Standard Time;(UTC+03:00);Moscow, St. Petersburg, Volgograd (RTZ 2) +Rwanda;RW;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Saint Barthélemy;BL;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Saint Helena, Ascension and Tristan da Cunha;SH;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Saint Kitts and Nevis;KN;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Saint Lucia;LC;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Saint Martin (French part);MF;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Saint Pierre and Miquelon;PM;Greenland Standard Time;(UTC-03:00);Greenland +Saint Vincent and the Grenadines;VC;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Samoa;WS;Samoa Standard Time;(UTC+13:00);Samoa +San Marino;SM;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +São Tomé and Príncipe;ST;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Saudi Arabia;SA;Arab Standard Time;(UTC+03:00);Kuwait, Riyadh +Senegal;SN;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Serbia;RS;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Seychelles;SC;Mauritius Standard Time;(UTC+04:00);Port Louis +Sierra Leone;SL;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Singapore;SG;Singapore Standard Time;(UTC+08:00);Kuala Lumpur, Singapore +Sint Maarten (Dutch part);SX;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Slovakia;SK;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Slovenia;SI;Central Europe Standard Time;(UTC+01:00);Belgrade, Bratislava, Budapest, Ljubljana, Prague +Solomon Islands;SB;Central Pacific Standard Time;(UTC+11:00);Solomon Is., New Caledonia +Somalia;SO;E. Africa Standard Time;(UTC+03:00);Nairobi +South Africa;ZA;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +South Georgia and the South Sandwich Islands;GS;UTC-02;(UTC-02:00);Coordinated Universal Time-02 +South Sudan;SS;E. Africa Standard Time;(UTC+03:00);Nairobi +Spain;ES;Romance Standard Time;(UTC+01:00);Brussels, Copenhagen, Madrid, Paris +Sri Lanka;LK;Sri Lanka Standard Time;(UTC+05:30);Sri Jayawardenepura +Sudan;SD;E. Africa Standard Time;(UTC+03:00);Nairobi +Suriname;SR;SA Eastern Standard Time;(UTC-03:00);Cayenne, Fortaleza +Svalbard;SJ;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Swaziland;SZ;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Sweden;SE;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Switzerland;CH;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Syria;SY;Syria Standard Time;(UTC+02:00);Damascus +Taiwan;TW;Taipei Standard Time;(UTC+08:00);Taipei +Tajikistan;TJ;West Asia Standard Time;(UTC+05:00);Ashgabat, Tashkent +Tanzania;TZ;E. Africa Standard Time;(UTC+03:00);Nairobi +Thailand;TH;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Togo;TG;Greenwich Standard Time;(UTC);Monrovia, Reykjavik +Tokelau;TK;Tonga Standard Time;(UTC+13:00);Nuku'alofa +Tonga;TO;Tonga Standard Time;(UTC+13:00);Nuku'alofa +Trinidad and Tobago;TT;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Tunisia;TN;W. Central Africa Standard Time;(UTC+01:00);West Central Africa +Türkiye;TR;Türkiye Standard Time;(UTC+02:00);Istanbul +Turkmenistan;TM;West Asia Standard Time;(UTC+05:00);Ashgabat, Tashkent +Turks and Caicos Islands;TC;Eastern Standard Time;(UTC-05:00);Eastern Time (US & Canada) +Tuvalu;TV;UTC+12;(UTC+12:00);Coordinated Universal Time+12 +U.S. Minor Outlying Islands;UM;UTC-11;(UTC-11:00);Coordinated Universal Time-11 +Uganda;UG;E. Africa Standard Time;(UTC+03:00);Nairobi +Ukraine;UA;FLE Standard Time;(UTC+02:00);Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius +United Arab Emirates;AE;Arabian Standard Time;(UTC+04:00);Abu Dhabi, Muscat +United Kingdom;GB;GMT Standard Time;(UTC);Dublin, Edinburgh, Lisbon, London +United States;US;Mountain Standard Time;(UTC-07:00);Mountain Time (US & Canada) +United States;US;Pacific Standard Time;(UTC-08:00);Pacific Time (US & Canada) +Uruguay;UY;Montevideo Standard Time;(UTC-03:00);Montevideo +Uzbekistan;UZ;West Asia Standard Time;(UTC+05:00);Ashgabat, Tashkent +Vanuatu;VU;Central Pacific Standard Time;(UTC+11:00);Solomon Is., New Caledonia +Vatican City;VA;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna +Vietnam;VN;SE Asia Standard Time;(UTC+07:00);Bangkok, Hanoi, Jakarta +Virgin Islands, U.S.;VI;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Virgin Islands, British;VG;SA Western Standard Time;(UTC-04:00);Georgetown, La Paz, Manaus, San Juan +Wallis and Futuna;WF;UTC+12;(UTC+12:00);Coordinated Universal Time+12 +Yemen;YE;Arab Standard Time;(UTC+03:00);Kuwait, Riyadh +Zambia;ZM;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +Zimbabwe;ZW;South Africa Standard Time;(UTC+02:00);Harare, Pretoria +#Source:https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 diff --git a/app/src/main/java/eu/faircode/email/CalendarHelper.java b/app/src/main/java/eu/faircode/email/CalendarHelper.java index 45fc4b9ecb..ffc3e0f753 100644 --- a/app/src/main/java/eu/faircode/email/CalendarHelper.java +++ b/app/src/main/java/eu/faircode/email/CalendarHelper.java @@ -148,22 +148,34 @@ public class CalendarHelper { String tzid = (tz == null ? null : tz.getID()); if (tzid == null) tzid = TimeZone.getDefault().getID(); - else { - // https://github.com/GNOME/evolution-mapi/blob/master/src/libexchangemapi/tz-mapi-to-ical - try (InputStream is = context.getAssets().open("tz-mapi-to-ical.txt")) { + else + try (InputStream is = context.getAssets().open("windows_timezones.txt")) { BufferedReader br = new BufferedReader(new InputStreamReader((is))); String line; while ((line = br.readLine()) != null) { - String[] info = line.split("~~~"); - if (info.length == 2 && info[0].equalsIgnoreCase(tzid)) { - EntityLog.log(context, "Event map " + tzid + " to " + info[1]); - tz.setID(info[1]); - } + if (line.startsWith("#")) + continue; + + String[] info = line.split(";"); + if (info.length != 5) + continue; + + if (!info[2].equalsIgnoreCase(tzid)) + continue; + + // Austria;AT;W. Europe Standard Time;(UTC+01:00);Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna + String utc = info[3] + .replace("UTC", "GMT") + .replace("(", "") + .replace(")", ""); + String _tzid = TimeZone.getTimeZone(utc).getID(); + EntityLog.log(context, "Event map " + tzid + " to " + _tzid + " " + info[3]); + tz.setID(_tzid); + break; } } catch (Throwable ex) { Log.e(ex); } - } String rrule = null; RecurrenceRule recurrence = event.getRecurrenceRule(); diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 280678744c..6a06d13b13 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -4282,14 +4282,23 @@ public class FragmentMessages extends FragmentBase for (long id : ids) { EntityMessage message = db.message().getMessage(id); + EntityLog.log(context, "MMM message found=" + (message != null)); if (message == null) continue; List messages = db.message().getMessagesByThread( message.account, message.thread, threading ? null : id, seen ? null : message.folder); - for (EntityMessage threaded : messages) + EntityLog.log(context, "MMM ids=" + ids.length + " seen=" + seen + " threading=" + threading + + " messages=" + messages.size()); + + for (EntityMessage threaded : messages) { + EntityFolder folder = db.folder().getFolder(threaded.folder); + EntityLog.log(context, "MMM message folder=" + folder.type + + " seen=" + threaded.ui_seen + + " change=" + (threaded.ui_seen != seen)); if (threaded.ui_seen != seen) EntityOperation.queue(context, threaded, EntityOperation.SEEN, seen); + } } db.setTransactionSuccessful();