[tz] [TZDB for Delphi] Encountered issue using TBundledTimezone on LINUX

Jean Frauciel jfrauciel at kiamo.fr
Wed Oct 17 09:01:49 UTC 2018


I'm working on the development of a software that uses the TZDB for Delphi
to deal with the timezones' management, and I'd like to have your opinion
about a problem that we are facing.
In a procedure, in order to decompose the periods of a timezone, we have to
know the timezone's year of a UTC DateTime.
To do so, we are using these commands :
thisBundledTimezone := TBundledTimeZone.GetTimeZone('America/Los_Angeles');
timeZoneYear := YearOf(IncMinute(aUTCDateTime,
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

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,

Développeur Moteur
jfrauciel at kiamo.fr
+33 5 47 48 33 20 <33547483320> |
 [image: logo web] <http://www.conecteo.fr/> [image: logo linkedin]
<https://www.linkedin.com/company/conecteo> <https://twitter.com/Conecteo>
Chers clients et partenaires, rejoignez votre espace communautaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20181017/688e9463/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TZDB.pas
Type: application/octet-stream
Size: 59476 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20181017/688e9463/TZDB-0001.pas>

More information about the tz mailing list