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

zeljko zeljko at holobit.net
Mon Oct 31 20:24:30 CET 2011


On Monday 31 of October 2011 20:17:46 you wrote:
> On Mon, 31 Oct 2011, zeljko wrote:
> > Hi,
> > 
> > 
> > I have daemon which uses Now() for getting current date/time, but
> > something is wrong, time on server changed from 03:00 to 02:00 this
> > weekend, but daemon's Now() was on old time ... until now ... I've just
> > restarted it and now it applied new time.
> > 
> > fpc-2.4.5, centos 5.5 ....
> > 
> > Also this confirms something what happens sometimes when ntpd changes
> > time ...
> > 
> > Any hints ? What to do ? Any workaround ?
> 
> It's probably the timezone information which is loaded only once at program
> startup.
> 
> This has been reported before, but no satisfying solution was found at the
> time. re-reading this file at each now() would be extremely slowing.

uuuh...that's *huge* problem now. I'm not sure but I think that it worked ok 
with dcc, since I didn't need to restart services before migration to fpc.
Maybe best way would be to use libc....uhhhh don't know, this thing desperated 
me completely ... must connect to client sites tomorrow all day and restart 
services.
Do you know issue # where that bug is reported ?

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


More information about the fpc-devel mailing list