To do so, we are using these commands :
thisBundledTimezone := TBundledTimeZone.GetTimeZone('America/Los_Angeles');
timeZoneYear := YearOf(IncMinute(aUTCDateTime, Round(thisBundledTimezone.UtcOffset.TotalMinutes)));
This is fine if the program is running on Windows, but it crashes on Linux.
The error occurs when we're trying to get the UtcOffset. The TBundledTimeZone can't read the
FPeriods[I] in the function GetPeriodAndRule.
The thing is that FPeriods is a TList that is not typed (with TCompiledPeriod) and Delphi can't use it this way with Linux.
We can by the way see a warning when compiling a project that includes TZDB.pas, telling that TList is deprecated.
We have solved the problem by modifying the TZDB.pas unit, but it seems weird to have to do this.
We are also using the Decomposer.pas unit, but it doesn't have any problem with Linux because it is already working with typed TLists (function Decompose).
Do you have any idea about this issue ? You can check the attachment to see our changes.
Thank you in advance for your answer,
Best regards,