On 27/10/2013 16:40, Michael Van Canneyt wrote:
[]
It is a known problem.
Doing this 100% correctly involves re-reading the timezone file at every
call of Now() or Date().
Clearly, this is a huge performance impact, severely skewing the time
information.
So this is not done.
The "unix" unit contains
Procedure ReReadLocalTime;
which will re-initialize the necessary variables. You can call this
routine at regular intervals as you see fit.
In your case, you may want to insert a call to this after every clock
update, which would be once a second.
Michael.
Thanks, Michael, that's most helpful, I can call it once an hour which
will be more than enough.
However, it seems that in the version I have for the Raspberry Pi (Laz:
1.0.6 FPC: 2.6.0) the "Unix" unit does not contain this procedure. I
did find the source code for it, but I don't want to have to ask folk
who might want to compile the clock program to have to also copy many
lines of code from the Unix unit. (Oh, and I tried both "unix" and
"Unix" - both seemed to work.)
Am I missing something?
Thanks
--
David
Web: http://www.satsignal.eu
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus