[fpc-devel] Problem with Now() and time changed by ntpd

zeljko zeljko at holobit.net
Tue Nov 1 09:41:54 CET 2011


On Tuesday 01 of November 2011 06:00:51 waldo kitty wrote:
> On 10/31/2011 15:47, Sven Barth wrote:
> > Maybe a possibilty should be implemented in unit Unix to reread the
> > timezone file. This wouldn't solve your problem directly, but it would
> > at least provide the ability to update the time zone information without
> > restarting the application/service. The trigger would need to come from
> > an external source though (maybe by checking that timezone database that
> > was in the media some weeks ago).
> 
> why should the trigger come from an external source? it is easy enough to
> have a routine watch and adjust automatically which could trigger the
> re-read sought...

Yes, after sleeping one night, I can say that I disagree with Sven about it.
This is base rtl function and it must be correct in all cases.
It must work correct, or please document it as weak and buggy (for linux).
I don't believe that kernel have only gettimeofday() and that kernel don't 
know accurate datetime. There's more functions in kernel which can give you 
accurate result. gettimeofday() is deprecated, so maybe that's main reason why 
it fails to give correct result with daylight changes.

zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20111101/4a7e5e2f/attachment.html>


More information about the fpc-devel mailing list