Update WindowsZones.c
This commit is contained in:
parent
3aec03c1ed
commit
1a52aff7f9
@ -15,4 +15,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
winpr_module_add(timezone.c)
|
||||
winpr_module_add(timezone.c TimeZones.c WindowsZones.c TimeZones.h WindowsZones.h)
|
||||
|
@ -2,30 +2,7 @@
|
||||
* Automatically generated with scripts/TimeZones.csx
|
||||
*/
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct _TIME_ZONE_RULE_ENTRY
|
||||
{
|
||||
UINT64 TicksStart;
|
||||
UINT64 TicksEnd;
|
||||
INT32 DaylightDelta;
|
||||
SYSTEMTIME StandardDate;
|
||||
SYSTEMTIME DaylightDate;
|
||||
};
|
||||
typedef struct _TIME_ZONE_RULE_ENTRY TIME_ZONE_RULE_ENTRY;
|
||||
|
||||
struct _TIME_ZONE_ENTRY
|
||||
{
|
||||
const char* Id;
|
||||
INT32 Bias;
|
||||
BOOL SupportsDST;
|
||||
const char* DisplayName;
|
||||
const char* StandardName;
|
||||
const char* DaylightName;
|
||||
const TIME_ZONE_RULE_ENTRY* RuleTable;
|
||||
UINT32 RuleTableCount;
|
||||
};
|
||||
typedef struct _TIME_ZONE_ENTRY TIME_ZONE_ENTRY;
|
||||
#pragma pack(pop)
|
||||
#include "TimeZones.h"
|
||||
|
||||
static const TIME_ZONE_RULE_ENTRY TimeZoneRuleTable_2[] = { {
|
||||
633031164000000000ULL,
|
||||
@ -3551,7 +3528,7 @@ static const TIME_ZONE_RULE_ENTRY TimeZoneRuleTable_135[] = { {
|
||||
{ 0, 9, 0, 5, 3, 0, 0, 0 },
|
||||
} };
|
||||
|
||||
static const TIME_ZONE_ENTRY TimeZoneTable[] = {
|
||||
const TIME_ZONE_ENTRY TimeZoneTable[] = {
|
||||
{ "Dateline Standard Time", 720, FALSE, "(UTC-12:00) International Date Line West",
|
||||
"Dateline Standard Time", "Dateline Daylight Time", NULL, 0 },
|
||||
{ "UTC-11", 660, FALSE, "(UTC-11:00) Coordinated Universal Time-11", "UTC-11", "UTC-11", NULL,
|
||||
@ -3833,3 +3810,5 @@ static const TIME_ZONE_ENTRY TimeZoneTable[] = {
|
||||
{ "Line Islands Standard Time", -840, FALSE, "(UTC+14:00) Kiritimati Island",
|
||||
"Line Islands Standard Time", "Line Islands Daylight Time", NULL, 0 }
|
||||
};
|
||||
|
||||
const size_t TimeZoneTableNrElements = ARRAYSIZE(TimeZoneTable);
|
||||
|
36
winpr/libwinpr/timezone/TimeZones.h
Normal file
36
winpr/libwinpr/timezone/TimeZones.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Automatically generated with scripts/TimeZones.csx
|
||||
*/
|
||||
|
||||
#ifndef WINPR_TIME_ZONES_H_
|
||||
#define WINPR_TIME_ZONES_H_
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
struct _TIME_ZONE_RULE_ENTRY
|
||||
{
|
||||
UINT64 TicksStart;
|
||||
UINT64 TicksEnd;
|
||||
INT32 DaylightDelta;
|
||||
SYSTEMTIME StandardDate;
|
||||
SYSTEMTIME DaylightDate;
|
||||
};
|
||||
typedef struct _TIME_ZONE_RULE_ENTRY TIME_ZONE_RULE_ENTRY;
|
||||
|
||||
struct _TIME_ZONE_ENTRY
|
||||
{
|
||||
const char* Id;
|
||||
INT32 Bias;
|
||||
BOOL SupportsDST;
|
||||
const char* DisplayName;
|
||||
const char* StandardName;
|
||||
const char* DaylightName;
|
||||
const TIME_ZONE_RULE_ENTRY* RuleTable;
|
||||
UINT32 RuleTableCount;
|
||||
};
|
||||
typedef struct _TIME_ZONE_ENTRY TIME_ZONE_ENTRY;
|
||||
|
||||
extern const TIME_ZONE_ENTRY TimeZoneTable[];
|
||||
extern const size_t TimeZoneTableNrElements;
|
||||
|
||||
#endif /* WINPR_TIME_ZONES_H_ */
|
@ -1,30 +1,35 @@
|
||||
/*
|
||||
* Automatically generated with scripts/WindowsZones.csx
|
||||
* Automatically generated with scripts/update-windows-zones.py
|
||||
*/
|
||||
|
||||
struct _WINDOWS_TZID_ENTRY
|
||||
{
|
||||
const char* windows;
|
||||
const char* tzid;
|
||||
};
|
||||
typedef struct _WINDOWS_TZID_ENTRY WINDOWS_TZID_ENTRY;
|
||||
#include "WindowsZones.h"
|
||||
|
||||
const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "AUS Central Standard Time", "Australia/Darwin" },
|
||||
{ "AUS Central Standard Time", "Australia/Darwin" },
|
||||
{ "AUS Eastern Standard Time", "Australia/Sydney Australia/Melbourne" },
|
||||
{ "AUS Eastern Standard Time", "Australia/Sydney" },
|
||||
{ "Afghanistan Standard Time", "Asia/Kabul" },
|
||||
{ "Afghanistan Standard Time", "Asia/Kabul" },
|
||||
{ "Alaskan Standard Time", "America/Anchorage America/Juneau America/Metlakatla America/Nome "
|
||||
"America/Sitka America/Yakutat" },
|
||||
{ "Alaskan Standard Time", "America/Anchorage" },
|
||||
{ "Aleutian Standard Time", "America/Adak" },
|
||||
{ "Aleutian Standard Time", "America/Adak" },
|
||||
{ "Altai Standard Time", "Asia/Barnaul" },
|
||||
{ "Altai Standard Time", "Asia/Barnaul" },
|
||||
{ "Arab Standard Time", "Asia/Aden" },
|
||||
{ "Arab Standard Time", "Asia/Bahrain" },
|
||||
{ "Arab Standard Time", "Asia/Kuwait" },
|
||||
{ "Arab Standard Time", "Asia/Qatar" },
|
||||
{ "Arab Standard Time", "Asia/Riyadh" },
|
||||
{ "Arab Standard Time", "Asia/Riyadh" },
|
||||
{ "Arabian Standard Time", "Asia/Dubai" },
|
||||
{ "Arabian Standard Time", "Asia/Dubai" },
|
||||
{ "Arabian Standard Time", "Asia/Muscat" },
|
||||
{ "Arabian Standard Time", "Etc/GMT-4" },
|
||||
{ "Arabic Standard Time", "Asia/Baghdad" },
|
||||
{ "Arabic Standard Time", "Asia/Baghdad" },
|
||||
{ "Argentina Standard Time",
|
||||
"America/Buenos_Aires America/Argentina/La_Rioja America/Argentina/Rio_Gallegos "
|
||||
"America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis "
|
||||
@ -38,35 +43,42 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "Atlantic Standard Time", "America/Halifax" },
|
||||
{ "Atlantic Standard Time", "America/Thule" },
|
||||
{ "Atlantic Standard Time", "Atlantic/Bermuda" },
|
||||
{ "AUS Central Standard Time", "Australia/Darwin" },
|
||||
{ "Aus Central W. Standard Time", "Australia/Eucla" },
|
||||
{ "AUS Eastern Standard Time", "Australia/Sydney Australia/Melbourne" },
|
||||
{ "AUS Eastern Standard Time", "Australia/Sydney" },
|
||||
{ "Aus Central W. Standard Time", "Australia/Eucla" },
|
||||
{ "Azerbaijan Standard Time", "Asia/Baku" },
|
||||
{ "Azerbaijan Standard Time", "Asia/Baku" },
|
||||
{ "Azores Standard Time", "America/Scoresbysund" },
|
||||
{ "Azores Standard Time", "Atlantic/Azores" },
|
||||
{ "Azores Standard Time", "Atlantic/Azores" },
|
||||
{ "Bahia Standard Time", "America/Bahia" },
|
||||
{ "Bahia Standard Time", "America/Bahia" },
|
||||
{ "Bangladesh Standard Time", "Asia/Dhaka" },
|
||||
{ "Bangladesh Standard Time", "Asia/Dhaka" },
|
||||
{ "Bangladesh Standard Time", "Asia/Thimphu" },
|
||||
{ "Belarus Standard Time", "Europe/Minsk" },
|
||||
{ "Belarus Standard Time", "Europe/Minsk" },
|
||||
{ "Bougainville Standard Time", "Pacific/Bougainville" },
|
||||
{ "Bougainville Standard Time", "Pacific/Bougainville" },
|
||||
{ "Canada Central Standard Time", "America/Regina America/Swift_Current" },
|
||||
{ "Canada Central Standard Time", "America/Regina" },
|
||||
{ "Cape Verde Standard Time", "Atlantic/Cape_Verde" },
|
||||
{ "Cape Verde Standard Time", "Atlantic/Cape_Verde" },
|
||||
{ "Cape Verde Standard Time", "Etc/GMT+1" },
|
||||
{ "Caucasus Standard Time", "Asia/Yerevan" },
|
||||
{ "Caucasus Standard Time", "Asia/Yerevan" },
|
||||
{ "Cen. Australia Standard Time", "Australia/Adelaide Australia/Broken_Hill" },
|
||||
{ "Cen. Australia Standard Time", "Australia/Adelaide" },
|
||||
{ "Central America Standard Time", "America/Belize" },
|
||||
{ "Central America Standard Time", "America/Costa_Rica" },
|
||||
{ "Central America Standard Time", "America/El_Salvador" },
|
||||
{ "Central America Standard Time", "America/Guatemala" },
|
||||
{ "Central America Standard Time", "America/Guatemala" },
|
||||
{ "Central America Standard Time", "America/Managua" },
|
||||
{ "Central America Standard Time", "America/Tegucigalpa" },
|
||||
{ "Central America Standard Time", "Etc/GMT+6" },
|
||||
{ "Central America Standard Time", "Pacific/Galapagos" },
|
||||
{ "Central Asia Standard Time", "Antarctica/Vostok" },
|
||||
{ "Central Asia Standard Time", "Asia/Almaty Asia/Qyzylorda" },
|
||||
{ "Central Asia Standard Time", "Asia/Almaty Asia/Qostanay" },
|
||||
{ "Central Asia Standard Time", "Asia/Almaty" },
|
||||
{ "Central Asia Standard Time", "Asia/Bishkek" },
|
||||
{ "Central Asia Standard Time", "Asia/Urumqi" },
|
||||
@ -77,6 +89,7 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "Central Europe Standard Time", "Europe/Belgrade" },
|
||||
{ "Central Europe Standard Time", "Europe/Bratislava" },
|
||||
{ "Central Europe Standard Time", "Europe/Budapest" },
|
||||
{ "Central Europe Standard Time", "Europe/Budapest" },
|
||||
{ "Central Europe Standard Time", "Europe/Ljubljana" },
|
||||
{ "Central Europe Standard Time", "Europe/Podgorica" },
|
||||
{ "Central Europe Standard Time", "Europe/Prague" },
|
||||
@ -84,11 +97,13 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "Central European Standard Time", "Europe/Sarajevo" },
|
||||
{ "Central European Standard Time", "Europe/Skopje" },
|
||||
{ "Central European Standard Time", "Europe/Warsaw" },
|
||||
{ "Central European Standard Time", "Europe/Warsaw" },
|
||||
{ "Central European Standard Time", "Europe/Zagreb" },
|
||||
{ "Central Pacific Standard Time", "Antarctica/Macquarie" },
|
||||
{ "Central Pacific Standard Time", "Etc/GMT-11" },
|
||||
{ "Central Pacific Standard Time", "Pacific/Efate" },
|
||||
{ "Central Pacific Standard Time", "Pacific/Guadalcanal" },
|
||||
{ "Central Pacific Standard Time", "Pacific/Guadalcanal" },
|
||||
{ "Central Pacific Standard Time", "Pacific/Noumea" },
|
||||
{ "Central Pacific Standard Time", "Pacific/Ponape Pacific/Kosrae" },
|
||||
{ "Central Standard Time (Mexico)",
|
||||
@ -103,10 +118,14 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
"America/Winnipeg America/Rainy_River America/Rankin_Inlet America/Resolute" },
|
||||
{ "Central Standard Time", "CST6CDT" },
|
||||
{ "Chatham Islands Standard Time", "Pacific/Chatham" },
|
||||
{ "Chatham Islands Standard Time", "Pacific/Chatham" },
|
||||
{ "China Standard Time", "Asia/Hong_Kong" },
|
||||
{ "China Standard Time", "Asia/Macau" },
|
||||
{ "China Standard Time", "Asia/Shanghai" },
|
||||
{ "China Standard Time", "Asia/Shanghai" },
|
||||
{ "Cuba Standard Time", "America/Havana" },
|
||||
{ "Cuba Standard Time", "America/Havana" },
|
||||
{ "Dateline Standard Time", "Etc/GMT+12" },
|
||||
{ "Dateline Standard Time", "Etc/GMT+12" },
|
||||
{ "E. Africa Standard Time", "Africa/Addis_Ababa" },
|
||||
{ "E. Africa Standard Time", "Africa/Asmera" },
|
||||
@ -116,6 +135,7 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "E. Africa Standard Time", "Africa/Kampala" },
|
||||
{ "E. Africa Standard Time", "Africa/Mogadishu" },
|
||||
{ "E. Africa Standard Time", "Africa/Nairobi" },
|
||||
{ "E. Africa Standard Time", "Africa/Nairobi" },
|
||||
{ "E. Africa Standard Time", "Antarctica/Syowa" },
|
||||
{ "E. Africa Standard Time", "Etc/GMT-3" },
|
||||
{ "E. Africa Standard Time", "Indian/Antananarivo" },
|
||||
@ -124,8 +144,12 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "E. Australia Standard Time", "Australia/Brisbane Australia/Lindeman" },
|
||||
{ "E. Australia Standard Time", "Australia/Brisbane" },
|
||||
{ "E. Europe Standard Time", "Europe/Chisinau" },
|
||||
{ "E. Europe Standard Time", "Europe/Chisinau" },
|
||||
{ "E. South America Standard Time", "America/Sao_Paulo" },
|
||||
{ "E. South America Standard Time", "America/Sao_Paulo" },
|
||||
{ "Easter Island Standard Time", "Pacific/Easter" },
|
||||
{ "Easter Island Standard Time", "Pacific/Easter" },
|
||||
{ "Eastern Standard Time (Mexico)", "America/Cancun" },
|
||||
{ "Eastern Standard Time (Mexico)", "America/Cancun" },
|
||||
{ "Eastern Standard Time", "America/Nassau" },
|
||||
{ "Eastern Standard Time",
|
||||
@ -136,8 +160,9 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
"America/Pangnirtung America/Thunder_Bay" },
|
||||
{ "Eastern Standard Time", "EST5EDT" },
|
||||
{ "Egypt Standard Time", "Africa/Cairo" },
|
||||
{ "Egypt Standard Time", "Africa/Cairo" },
|
||||
{ "Ekaterinburg Standard Time", "Asia/Yekaterinburg" },
|
||||
{ "Ekaterinburg Standard Time", "Asia/Yekaterinburg" },
|
||||
{ "Fiji Standard Time", "Pacific/Fiji" },
|
||||
{ "FLE Standard Time", "Europe/Helsinki" },
|
||||
{ "FLE Standard Time", "Europe/Kiev Europe/Uzhgorod Europe/Zaporozhye" },
|
||||
{ "FLE Standard Time", "Europe/Kiev" },
|
||||
@ -146,7 +171,8 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "FLE Standard Time", "Europe/Sofia" },
|
||||
{ "FLE Standard Time", "Europe/Tallinn" },
|
||||
{ "FLE Standard Time", "Europe/Vilnius" },
|
||||
{ "Georgian Standard Time", "Asia/Tbilisi" },
|
||||
{ "Fiji Standard Time", "Pacific/Fiji" },
|
||||
{ "Fiji Standard Time", "Pacific/Fiji" },
|
||||
{ "GMT Standard Time", "Atlantic/Canary" },
|
||||
{ "GMT Standard Time", "Atlantic/Faeroe" },
|
||||
{ "GMT Standard Time", "Europe/Dublin" },
|
||||
@ -155,6 +181,14 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "GMT Standard Time", "Europe/Jersey" },
|
||||
{ "GMT Standard Time", "Europe/Lisbon Atlantic/Madeira" },
|
||||
{ "GMT Standard Time", "Europe/London" },
|
||||
{ "GMT Standard Time", "Europe/London" },
|
||||
{ "GTB Standard Time", "Asia/Nicosia Asia/Famagusta" },
|
||||
{ "GTB Standard Time", "Europe/Athens" },
|
||||
{ "GTB Standard Time", "Europe/Bucharest" },
|
||||
{ "GTB Standard Time", "Europe/Bucharest" },
|
||||
{ "Georgian Standard Time", "Asia/Tbilisi" },
|
||||
{ "Georgian Standard Time", "Asia/Tbilisi" },
|
||||
{ "Greenland Standard Time", "America/Godthab" },
|
||||
{ "Greenland Standard Time", "America/Godthab" },
|
||||
{ "Greenwich Standard Time", "Africa/Abidjan" },
|
||||
{ "Greenwich Standard Time", "Africa/Accra" },
|
||||
@ -169,35 +203,50 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "Greenwich Standard Time", "Africa/Nouakchott" },
|
||||
{ "Greenwich Standard Time", "Africa/Ouagadougou" },
|
||||
{ "Greenwich Standard Time", "Atlantic/Reykjavik" },
|
||||
{ "Greenwich Standard Time", "Atlantic/Reykjavik" },
|
||||
{ "Greenwich Standard Time", "Atlantic/St_Helena" },
|
||||
{ "GTB Standard Time", "Asia/Famagusta Asia/Nicosia" },
|
||||
{ "GTB Standard Time", "Europe/Athens" },
|
||||
{ "GTB Standard Time", "Europe/Bucharest" },
|
||||
{ "Haiti Standard Time", "America/Port-au-Prince" },
|
||||
{ "Haiti Standard Time", "America/Port-au-Prince" },
|
||||
{ "Hawaiian Standard Time", "Etc/GMT+10" },
|
||||
{ "Hawaiian Standard Time", "Pacific/Honolulu" },
|
||||
{ "Hawaiian Standard Time", "Pacific/Honolulu" },
|
||||
{ "Hawaiian Standard Time", "Pacific/Johnston" },
|
||||
{ "Hawaiian Standard Time", "Pacific/Rarotonga" },
|
||||
{ "Hawaiian Standard Time", "Pacific/Tahiti" },
|
||||
{ "India Standard Time", "Asia/Calcutta" },
|
||||
{ "India Standard Time", "Asia/Calcutta" },
|
||||
{ "Iran Standard Time", "Asia/Tehran" },
|
||||
{ "Iran Standard Time", "Asia/Tehran" },
|
||||
{ "Israel Standard Time", "Asia/Jerusalem" },
|
||||
{ "Israel Standard Time", "Asia/Jerusalem" },
|
||||
{ "Jordan Standard Time", "Asia/Amman" },
|
||||
{ "Jordan Standard Time", "Asia/Amman" },
|
||||
{ "Kaliningrad Standard Time", "Europe/Kaliningrad" },
|
||||
{ "Kaliningrad Standard Time", "Europe/Kaliningrad" },
|
||||
{ "Korea Standard Time", "Asia/Seoul" },
|
||||
{ "Korea Standard Time", "Asia/Seoul" },
|
||||
{ "Libya Standard Time", "Africa/Tripoli" },
|
||||
{ "Libya Standard Time", "Africa/Tripoli" },
|
||||
{ "Line Islands Standard Time", "Etc/GMT-14" },
|
||||
{ "Line Islands Standard Time", "Pacific/Kiritimati" },
|
||||
{ "Line Islands Standard Time", "Pacific/Kiritimati" },
|
||||
{ "Lord Howe Standard Time", "Australia/Lord_Howe" },
|
||||
{ "Lord Howe Standard Time", "Australia/Lord_Howe" },
|
||||
{ "Magadan Standard Time", "Asia/Magadan" },
|
||||
{ "Magadan Standard Time", "Asia/Magadan" },
|
||||
{ "Magallanes Standard Time", "America/Punta_Arenas" },
|
||||
{ "Magallanes Standard Time", "Antarctica/Palmer" },
|
||||
{ "Magallanes Standard Time", "America/Punta_Arenas" },
|
||||
{ "Marquesas Standard Time", "Pacific/Marquesas" },
|
||||
{ "Marquesas Standard Time", "Pacific/Marquesas" },
|
||||
{ "Mauritius Standard Time", "Indian/Mahe" },
|
||||
{ "Mauritius Standard Time", "Indian/Mauritius" },
|
||||
{ "Mauritius Standard Time", "Indian/Mauritius" },
|
||||
{ "Mauritius Standard Time", "Indian/Reunion" },
|
||||
{ "Middle East Standard Time", "Asia/Beirut" },
|
||||
{ "Middle East Standard Time", "Asia/Beirut" },
|
||||
{ "Montevideo Standard Time", "America/Montevideo" },
|
||||
{ "Montevideo Standard Time", "America/Montevideo" },
|
||||
{ "Morocco Standard Time", "Africa/Casablanca" },
|
||||
{ "Morocco Standard Time", "Africa/Casablanca" },
|
||||
{ "Morocco Standard Time", "Africa/El_Aaiun" },
|
||||
{ "Mountain Standard Time (Mexico)", "America/Chihuahua America/Mazatlan" },
|
||||
@ -209,46 +258,67 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "Mountain Standard Time", "America/Ojinaga" },
|
||||
{ "Mountain Standard Time", "MST7MDT" },
|
||||
{ "Myanmar Standard Time", "Asia/Rangoon" },
|
||||
{ "Myanmar Standard Time", "Asia/Rangoon" },
|
||||
{ "Myanmar Standard Time", "Indian/Cocos" },
|
||||
{ "N. Central Asia Standard Time", "Asia/Novosibirsk" },
|
||||
{ "N. Central Asia Standard Time", "Asia/Novosibirsk" },
|
||||
{ "Namibia Standard Time", "Africa/Windhoek" },
|
||||
{ "Namibia Standard Time", "Africa/Windhoek" },
|
||||
{ "Nepal Standard Time", "Asia/Katmandu" },
|
||||
{ "Nepal Standard Time", "Asia/Katmandu" },
|
||||
{ "New Zealand Standard Time", "Antarctica/McMurdo" },
|
||||
{ "New Zealand Standard Time", "Pacific/Auckland" },
|
||||
{ "New Zealand Standard Time", "Pacific/Auckland" },
|
||||
{ "Newfoundland Standard Time", "America/St_Johns" },
|
||||
{ "Newfoundland Standard Time", "America/St_Johns" },
|
||||
{ "Norfolk Standard Time", "Pacific/Norfolk" },
|
||||
{ "Norfolk Standard Time", "Pacific/Norfolk" },
|
||||
{ "North Asia East Standard Time", "Asia/Irkutsk" },
|
||||
{ "North Asia East Standard Time", "Asia/Irkutsk" },
|
||||
{ "North Asia Standard Time", "Asia/Krasnoyarsk Asia/Novokuznetsk" },
|
||||
{ "North Asia Standard Time", "Asia/Krasnoyarsk" },
|
||||
{ "North Korea Standard Time", "Asia/Pyongyang" },
|
||||
{ "North Korea Standard Time", "Asia/Pyongyang" },
|
||||
{ "Omsk Standard Time", "Asia/Omsk" },
|
||||
{ "Omsk Standard Time", "Asia/Omsk" },
|
||||
{ "Pacific SA Standard Time", "America/Santiago" },
|
||||
{ "Pacific SA Standard Time", "America/Santiago" },
|
||||
{ "Pacific Standard Time (Mexico)", "America/Tijuana America/Santa_Isabel" },
|
||||
{ "Pacific Standard Time (Mexico)", "America/Tijuana" },
|
||||
{ "Pacific Standard Time", "America/Los_Angeles" },
|
||||
{ "Pacific Standard Time", "America/Los_Angeles" },
|
||||
{ "Pacific Standard Time", "America/Vancouver America/Dawson America/Whitehorse" },
|
||||
{ "Pacific Standard Time", "PST8PDT" },
|
||||
{ "Pakistan Standard Time", "Asia/Karachi" },
|
||||
{ "Pakistan Standard Time", "Asia/Karachi" },
|
||||
{ "Paraguay Standard Time", "America/Asuncion" },
|
||||
{ "Paraguay Standard Time", "America/Asuncion" },
|
||||
{ "Qyzylorda Standard Time", "Asia/Qyzylorda" },
|
||||
{ "Qyzylorda Standard Time", "Asia/Qyzylorda" },
|
||||
{ "Romance Standard Time", "Europe/Brussels" },
|
||||
{ "Romance Standard Time", "Europe/Copenhagen" },
|
||||
{ "Romance Standard Time", "Europe/Madrid Africa/Ceuta" },
|
||||
{ "Romance Standard Time", "Europe/Paris" },
|
||||
{ "Romance Standard Time", "Europe/Paris" },
|
||||
{ "Russia Time Zone 10", "Asia/Srednekolymsk" },
|
||||
{ "Russia Time Zone 10", "Asia/Srednekolymsk" },
|
||||
{ "Russia Time Zone 11", "Asia/Kamchatka Asia/Anadyr" },
|
||||
{ "Russia Time Zone 11", "Asia/Kamchatka" },
|
||||
{ "Russia Time Zone 3", "Europe/Samara" },
|
||||
{ "Russian Standard Time", "Europe/Moscow Europe/Kirov Europe/Volgograd" },
|
||||
{ "Russia Time Zone 3", "Europe/Samara" },
|
||||
{ "Russian Standard Time", "Europe/Moscow Europe/Kirov" },
|
||||
{ "Russian Standard Time", "Europe/Moscow" },
|
||||
{ "Russian Standard Time", "Europe/Simferopol" },
|
||||
{ "SA Eastern Standard Time", "America/Cayenne" },
|
||||
{ "SA Eastern Standard Time", "America/Cayenne" },
|
||||
{ "SA Eastern Standard Time",
|
||||
"America/Fortaleza America/Belem America/Maceio America/Recife America/Santarem" },
|
||||
{ "SA Eastern Standard Time", "America/Paramaribo" },
|
||||
{ "SA Eastern Standard Time", "Antarctica/Rothera" },
|
||||
{ "SA Eastern Standard Time", "Antarctica/Rothera Antarctica/Palmer" },
|
||||
{ "SA Eastern Standard Time", "Atlantic/Stanley" },
|
||||
{ "SA Eastern Standard Time", "Etc/GMT+3" },
|
||||
{ "SA Pacific Standard Time", "America/Bogota" },
|
||||
{ "SA Pacific Standard Time", "America/Bogota" },
|
||||
{ "SA Pacific Standard Time", "America/Cayman" },
|
||||
{ "SA Pacific Standard Time", "America/Coral_Harbour" },
|
||||
{ "SA Pacific Standard Time", "America/Guayaquil" },
|
||||
@ -269,6 +339,7 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "SA Western Standard Time", "America/Guyana" },
|
||||
{ "SA Western Standard Time", "America/Kralendijk" },
|
||||
{ "SA Western Standard Time", "America/La_Paz" },
|
||||
{ "SA Western Standard Time", "America/La_Paz" },
|
||||
{ "SA Western Standard Time", "America/Lower_Princes" },
|
||||
{ "SA Western Standard Time", "America/Manaus America/Boa_Vista America/Porto_Velho" },
|
||||
{ "SA Western Standard Time", "America/Marigot" },
|
||||
@ -284,30 +355,39 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "SA Western Standard Time", "America/St_Vincent" },
|
||||
{ "SA Western Standard Time", "America/Tortola" },
|
||||
{ "SA Western Standard Time", "Etc/GMT+4" },
|
||||
{ "Saint Pierre Standard Time", "America/Miquelon" },
|
||||
{ "Sakhalin Standard Time", "Asia/Sakhalin" },
|
||||
{ "Samoa Standard Time", "Pacific/Apia" },
|
||||
{ "Sao Tome Standard Time", "Africa/Sao_Tome" },
|
||||
{ "Saratov Standard Time", "Europe/Saratov" },
|
||||
{ "SE Asia Standard Time", "Antarctica/Davis" },
|
||||
{ "SE Asia Standard Time", "Asia/Bangkok" },
|
||||
{ "SE Asia Standard Time", "Asia/Bangkok" },
|
||||
{ "SE Asia Standard Time", "Asia/Jakarta Asia/Pontianak" },
|
||||
{ "SE Asia Standard Time", "Asia/Phnom_Penh" },
|
||||
{ "SE Asia Standard Time", "Asia/Saigon" },
|
||||
{ "SE Asia Standard Time", "Asia/Vientiane" },
|
||||
{ "SE Asia Standard Time", "Etc/GMT-7" },
|
||||
{ "SE Asia Standard Time", "Indian/Christmas" },
|
||||
{ "Saint Pierre Standard Time", "America/Miquelon" },
|
||||
{ "Saint Pierre Standard Time", "America/Miquelon" },
|
||||
{ "Sakhalin Standard Time", "Asia/Sakhalin" },
|
||||
{ "Sakhalin Standard Time", "Asia/Sakhalin" },
|
||||
{ "Samoa Standard Time", "Pacific/Apia" },
|
||||
{ "Samoa Standard Time", "Pacific/Apia" },
|
||||
{ "Sao Tome Standard Time", "Africa/Sao_Tome" },
|
||||
{ "Sao Tome Standard Time", "Africa/Sao_Tome" },
|
||||
{ "Saratov Standard Time", "Europe/Saratov" },
|
||||
{ "Saratov Standard Time", "Europe/Saratov" },
|
||||
{ "Singapore Standard Time", "Antarctica/Casey" },
|
||||
{ "Singapore Standard Time", "Asia/Brunei" },
|
||||
{ "Singapore Standard Time", "Asia/Kuala_Lumpur Asia/Kuching" },
|
||||
{ "Singapore Standard Time", "Asia/Makassar" },
|
||||
{ "Singapore Standard Time", "Asia/Manila" },
|
||||
{ "Singapore Standard Time", "Asia/Singapore" },
|
||||
{ "Singapore Standard Time", "Asia/Singapore" },
|
||||
{ "Singapore Standard Time", "Etc/GMT-8" },
|
||||
{ "South Africa Standard Time", "Africa/Blantyre" },
|
||||
{ "South Africa Standard Time", "Africa/Bujumbura" },
|
||||
{ "South Africa Standard Time", "Africa/Gaborone" },
|
||||
{ "South Africa Standard Time", "Africa/Harare" },
|
||||
{ "South Africa Standard Time", "Africa/Johannesburg" },
|
||||
{ "South Africa Standard Time", "Africa/Johannesburg" },
|
||||
{ "South Africa Standard Time", "Africa/Kigali" },
|
||||
{ "South Africa Standard Time", "Africa/Lubumbashi" },
|
||||
{ "South Africa Standard Time", "Africa/Lusaka" },
|
||||
@ -316,35 +396,46 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "South Africa Standard Time", "Africa/Mbabane" },
|
||||
{ "South Africa Standard Time", "Etc/GMT-2" },
|
||||
{ "Sri Lanka Standard Time", "Asia/Colombo" },
|
||||
{ "Sri Lanka Standard Time", "Asia/Colombo" },
|
||||
{ "Sudan Standard Time", "Africa/Khartoum" },
|
||||
{ "Sudan Standard Time", "Africa/Khartoum" },
|
||||
{ "Syria Standard Time", "Asia/Damascus" },
|
||||
{ "Syria Standard Time", "Asia/Damascus" },
|
||||
{ "Taipei Standard Time", "Asia/Taipei" },
|
||||
{ "Taipei Standard Time", "Asia/Taipei" },
|
||||
{ "Tasmania Standard Time", "Australia/Hobart Australia/Currie" },
|
||||
{ "Tasmania Standard Time", "Australia/Hobart" },
|
||||
{ "Tocantins Standard Time", "America/Araguaina" },
|
||||
{ "Tocantins Standard Time", "America/Araguaina" },
|
||||
{ "Tokyo Standard Time", "Asia/Dili" },
|
||||
{ "Tokyo Standard Time", "Asia/Jayapura" },
|
||||
{ "Tokyo Standard Time", "Asia/Tokyo" },
|
||||
{ "Tokyo Standard Time", "Asia/Tokyo" },
|
||||
{ "Tokyo Standard Time", "Etc/GMT-9" },
|
||||
{ "Tokyo Standard Time", "Pacific/Palau" },
|
||||
{ "Tomsk Standard Time", "Asia/Tomsk" },
|
||||
{ "Tomsk Standard Time", "Asia/Tomsk" },
|
||||
{ "Tonga Standard Time", "Pacific/Tongatapu" },
|
||||
{ "Tonga Standard Time", "Pacific/Tongatapu" },
|
||||
{ "Transbaikal Standard Time", "Asia/Chita" },
|
||||
{ "Transbaikal Standard Time", "Asia/Chita" },
|
||||
{ "Turkey Standard Time", "Europe/Istanbul" },
|
||||
{ "Turkey Standard Time", "Europe/Istanbul" },
|
||||
{ "Turks And Caicos Standard Time", "America/Grand_Turk" },
|
||||
{ "Ulaanbaatar Standard Time", "Asia/Ulaanbaatar Asia/Choibalsan" },
|
||||
{ "Ulaanbaatar Standard Time", "Asia/Ulaanbaatar" },
|
||||
{ "Turks And Caicos Standard Time", "America/Grand_Turk" },
|
||||
{ "US Eastern Standard Time",
|
||||
"America/Indianapolis America/Indiana/Marengo America/Indiana/Vevay" },
|
||||
{ "US Eastern Standard Time", "America/Indianapolis" },
|
||||
{ "US Mountain Standard Time", "America/Dawson_Creek America/Creston America/Fort_Nelson" },
|
||||
{ "US Mountain Standard Time", "America/Hermosillo" },
|
||||
{ "US Mountain Standard Time", "America/Phoenix" },
|
||||
{ "US Mountain Standard Time", "America/Phoenix" },
|
||||
{ "US Mountain Standard Time", "Etc/GMT+7" },
|
||||
{ "UTC", "America/Danmarkshavn" },
|
||||
{ "UTC", "Etc/GMT Etc/UTC" },
|
||||
{ "UTC", "Etc/GMT" },
|
||||
{ "UTC+12", "Etc/GMT-12" },
|
||||
{ "UTC+12", "Etc/GMT-12" },
|
||||
{ "UTC+12", "Pacific/Funafuti" },
|
||||
{ "UTC+12", "Pacific/Majuro Pacific/Kwajalein" },
|
||||
{ "UTC+12", "Pacific/Nauru" },
|
||||
@ -352,23 +443,33 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "UTC+12", "Pacific/Wake" },
|
||||
{ "UTC+12", "Pacific/Wallis" },
|
||||
{ "UTC+13", "Etc/GMT-13" },
|
||||
{ "UTC+13", "Etc/GMT-13" },
|
||||
{ "UTC+13", "Pacific/Enderbury" },
|
||||
{ "UTC+13", "Pacific/Fakaofo" },
|
||||
{ "UTC-02", "America/Noronha" },
|
||||
{ "UTC-02", "Atlantic/South_Georgia" },
|
||||
{ "UTC-02", "Etc/GMT+2" },
|
||||
{ "UTC-02", "Etc/GMT+2" },
|
||||
{ "UTC-08", "Etc/GMT+8" },
|
||||
{ "UTC-08", "Etc/GMT+8" },
|
||||
{ "UTC-08", "Pacific/Pitcairn" },
|
||||
{ "UTC-09", "Etc/GMT+9" },
|
||||
{ "UTC-09", "Etc/GMT+9" },
|
||||
{ "UTC-09", "Pacific/Gambier" },
|
||||
{ "UTC-11", "Etc/GMT+11" },
|
||||
{ "UTC-11", "Etc/GMT+11" },
|
||||
{ "UTC-11", "Pacific/Midway" },
|
||||
{ "UTC-11", "Pacific/Niue" },
|
||||
{ "UTC-11", "Pacific/Pago_Pago" },
|
||||
{ "Ulaanbaatar Standard Time", "Asia/Ulaanbaatar Asia/Choibalsan" },
|
||||
{ "Ulaanbaatar Standard Time", "Asia/Ulaanbaatar" },
|
||||
{ "Venezuela Standard Time", "America/Caracas" },
|
||||
{ "Venezuela Standard Time", "America/Caracas" },
|
||||
{ "Vladivostok Standard Time", "Asia/Vladivostok Asia/Ust-Nera" },
|
||||
{ "Vladivostok Standard Time", "Asia/Vladivostok" },
|
||||
{ "W. Australia Standard Time", "Antarctica/Casey" },
|
||||
{ "Volgograd Standard Time", "Europe/Volgograd" },
|
||||
{ "Volgograd Standard Time", "Europe/Volgograd" },
|
||||
{ "W. Australia Standard Time", "Australia/Perth" },
|
||||
{ "W. Australia Standard Time", "Australia/Perth" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Algiers" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Bangui" },
|
||||
@ -376,6 +477,7 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "W. Central Africa Standard Time", "Africa/Douala" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Kinshasa" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Lagos" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Lagos" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Libreville" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Luanda" },
|
||||
{ "W. Central Africa Standard Time", "Africa/Malabo" },
|
||||
@ -402,6 +504,7 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "W. Europe Standard Time", "Europe/Vienna" },
|
||||
{ "W. Europe Standard Time", "Europe/Zurich" },
|
||||
{ "W. Mongolia Standard Time", "Asia/Hovd" },
|
||||
{ "W. Mongolia Standard Time", "Asia/Hovd" },
|
||||
{ "West Asia Standard Time", "Antarctica/Mawson" },
|
||||
{ "West Asia Standard Time", "Asia/Ashgabat" },
|
||||
{ "West Asia Standard Time", "Asia/Dushanbe" },
|
||||
@ -417,8 +520,11 @@ const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[] = {
|
||||
{ "West Pacific Standard Time", "Etc/GMT-10" },
|
||||
{ "West Pacific Standard Time", "Pacific/Guam" },
|
||||
{ "West Pacific Standard Time", "Pacific/Port_Moresby" },
|
||||
{ "West Pacific Standard Time", "Pacific/Port_Moresby" },
|
||||
{ "West Pacific Standard Time", "Pacific/Saipan" },
|
||||
{ "West Pacific Standard Time", "Pacific/Truk" },
|
||||
{ "Yakutsk Standard Time", "Asia/Yakutsk Asia/Khandyga" },
|
||||
{ "Yakutsk Standard Time", "Asia/Yakutsk" },
|
||||
};
|
||||
|
||||
const size_t WindowsTimeZoneIdTableNrElements = ARRAYSIZE(WindowsTimeZoneIdTable);
|
||||
|
19
winpr/libwinpr/timezone/WindowsZones.h
Normal file
19
winpr/libwinpr/timezone/WindowsZones.h
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Automatically generated with scripts/update-windows-zones.py
|
||||
*/
|
||||
#ifndef WINPR_WINDOWS_ZONES_H_
|
||||
#define WINPR_WINDOWS_ZONES_H_
|
||||
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
struct _WINDOWS_TZID_ENTRY
|
||||
{
|
||||
const char* windows;
|
||||
const char* tzid;
|
||||
};
|
||||
typedef struct _WINDOWS_TZID_ENTRY WINDOWS_TZID_ENTRY;
|
||||
|
||||
extern const WINDOWS_TZID_ENTRY WindowsTimeZoneIdTable[];
|
||||
extern const size_t WindowsTimeZoneIdTableNrElements;
|
||||
|
||||
#endif /* WINPR_WINDOWS_ZONES_H_ */
|
@ -33,11 +33,8 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Table generated with TimeZones.csx */
|
||||
#include "TimeZones.c"
|
||||
|
||||
/* Table generated with WindowsZones.csx */
|
||||
#include "WindowsZones.c"
|
||||
#include "TimeZones.h"
|
||||
#include "WindowsZones.h"
|
||||
|
||||
static UINT64 winpr_windows_gmtime(void)
|
||||
{
|
||||
@ -277,7 +274,7 @@ static TIME_ZONE_ENTRY* winpr_detect_windows_time_zone(void)
|
||||
{
|
||||
size_t i, j;
|
||||
char* tzid;
|
||||
TIME_ZONE_ENTRY* timezone;
|
||||
|
||||
tzid = winpr_get_unix_timezone_identifier_from_file();
|
||||
|
||||
if (tzid == NULL)
|
||||
@ -286,18 +283,21 @@ static TIME_ZONE_ENTRY* winpr_detect_windows_time_zone(void)
|
||||
if (tzid == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < ARRAYSIZE(TimeZoneTable); i++)
|
||||
for (i = 0; i < TimeZoneTableNrElements; i++)
|
||||
{
|
||||
for (j = 0; j < ARRAYSIZE(WindowsTimeZoneIdTable); j++)
|
||||
const TIME_ZONE_ENTRY* tze = &TimeZoneTable[i];
|
||||
|
||||
for (j = 0; j < WindowsTimeZoneIdTableNrElements; j++)
|
||||
{
|
||||
if (strcmp(TimeZoneTable[i].Id, WindowsTimeZoneIdTable[j].windows) != 0)
|
||||
const WINDOWS_TZID_ENTRY* wzid = &WindowsTimeZoneIdTable[j];
|
||||
|
||||
if (strcmp(tze->Id, wzid->windows) != 0)
|
||||
continue;
|
||||
|
||||
if (winpr_match_unix_timezone_identifier_with_list(tzid,
|
||||
WindowsTimeZoneIdTable[j].tzid))
|
||||
if (winpr_match_unix_timezone_identifier_with_list(tzid, wzid->tzid))
|
||||
{
|
||||
TIME_ZONE_ENTRY* timezone = (TIME_ZONE_ENTRY*)malloc(sizeof(TIME_ZONE_ENTRY));
|
||||
free(tzid);
|
||||
timezone = (TIME_ZONE_ENTRY*)malloc(sizeof(TIME_ZONE_ENTRY));
|
||||
|
||||
if (!timezone)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user