[fpc-devel] Problem with Now() and time changed by ntpd
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Tue Nov 1 11:36:25 CET 2011
One idea: In Now if you read the timezones, then store the value of
Now. In subsequent calls check if 1 hour has passed since the last
time the timezones were checked. If yes, then update the timezones and
store this new base value of Now.
This makes a compromise between speed and correctnees. It would at
most be wrong for 1 hour during a long running application. For other
applications which call Now very frequently we only add some value
checkes more to the overhead, which shouldn't be expensive.
--
Felipe Monteiro de Carvalho
More information about the fpc-devel
mailing list