pavkam / tzdb

Delphi/FPC Time Zone Database
https://www.iana.org/time-zones
BSD 3-Clause "New" or "Revised" License
84 stars 27 forks source link

Incompatible types 'TTimeZone' and 'TBundledTimeZone' #29

Closed pedssodre closed 4 years ago

pedssodre commented 4 years ago

Hello,

When i tried to execute the example:

var LAmsterdam: TTimeZone; begin LAmsterdam := TBundledTimeZone.GetTimeZone('Europe/Amsterdam'); ... ... end;

I got the error saying that LAmsterdam is a TTimeZone not compatible with TBundledTimeZone.

Do you know how to fix this?

pavkam commented 4 years ago

The "newest" (2019) version of TZDB splits the TBundledTimeZone from TTimeZone due to design issues. Use TBundledTimeZone as the only type from 2019.