Thanks rlebeau.
What I did now (and it works!) is the following:
Removed lines 7356 and 7357 from IdGlobal.
// timeval: TTimeVal;
// timezone: TTimeZone;
Added a new line:
NowDT:tDateTime;
Removed original lines 7412, 7413 (after the insert of the above 7413, 7414):
// fpGetTimeOfDay (@TimeVal, @TimeZone);
// Result := -1 * (timezone.tz_minuteswest / 60 / 24);
And added two new lines (using DateUtils that is included in this set-up already):
NowDT:=Now;
result:=NowDT-LocalTimeToUniversal(NowDT);
Recompiled indylaz. Works perfekt.
It would be nice to have it fixed in the official IdGlobal as well somehow.
One more point, I have not inverstigated deeper:
DateUtils uses GetLocalTimeOffset to get the LocalTimeToUniversal conversion, so theoretically it would be enough to have:
result:=-GetLocalTimeOffset/60;
Still if I do that in IdGlobal, it gives 0, not the real Offset. Either IdGlobal accesses another version of GetLocalTimeOffset from another library or TZSeconds is not yet initialised if called directly.
What I did now (and it works!) is the following:
Removed lines 7356 and 7357 from IdGlobal.
// timeval: TTimeVal;
// timezone: TTimeZone;
Added a new line:
NowDT:tDateTime;
Removed original lines 7412, 7413 (after the insert of the above 7413, 7414):
// fpGetTimeOfDay (@TimeVal, @TimeZone);
// Result := -1 * (timezone.tz_minuteswest / 60 / 24);
And added two new lines (using DateUtils that is included in this set-up already):
NowDT:=Now;
result:=NowDT-LocalTimeToUniversal(NowDT);
Recompiled indylaz. Works perfekt.
It would be nice to have it fixed in the official IdGlobal as well somehow.
One more point, I have not inverstigated deeper:
DateUtils uses GetLocalTimeOffset to get the LocalTimeToUniversal conversion, so theoretically it would be enough to have:
result:=-GetLocalTimeOffset/60;
Still if I do that in IdGlobal, it gives 0, not the real Offset. Either IdGlobal accesses another version of GetLocalTimeOffset from another library or TZSeconds is not yet initialised if called directly.