CountryTimezone is a Delphi module provides a mapping from ISO 3166 country codes to a list of timezone names commonly used within that country. This allows you to easily find the relevant timezones for a given country. It uses IANA tzdb timezone descriptions from zone1970.tab.
procedure GetAllCountryTimezones(const AList: TStrings);
var
CountryNameDictionary: TCountryTimezoneDictionary;
code: String;
begin
CountryNameDictionary := TCountryTimezoneDictionary.Create();
try
for code in CountryNameDictionary.Keys do begin
AList.Add(code+': '+CountryNameDictionary[code]);
end;
finally
CountryNameDictionary.Free;
end;
end;procedure GetCountryTimezones(const AList: TStrings);
var
CountryNameDictionary: TCountryTimezoneDictionary;
begin
CountryNameDictionary := TCountryTimezoneDictionary.Create();
try
CountryNameDictionary.GetCountryTimezones('US', AList);
finally
CountryNameDictionary.Free;
end;
end;