On Tuesday 01 of November 2011 19:18:38 you wrote: > It will be something like that, yes. I was thinking of introducing a > > CheckRefreshTZInfoInterval: integer; > > -1 : never check for refresh (current behaviour) > 0 : refresh on each call (like LibC, will be new default) > > >0 : Only refresh every N [yourfavouriteinterval]. > > But of course not in fpgettimeofday, in EpochToLocalTime. I repeat: > fpgettimeofday returns UTC time, it does not need to read timezone info.
Yes, you're correct here. > > It is the step which converts this time to local time that must re-read the > timezone files if needed. (EpochToLocalTime, the equivalent of localtime_r > in libc) > > However, meanwhile: > 3. A more simple mechanism is using the (newly added) ReReadTimeZone (unix > unit): > > ReReadTimeZone; > > Which will re-read TZ and re-calculate DST settings all in one go. > I added this in revision 19569. The idea is that the new 'automation' > mechanism will call this routine. Ok, will this routine be merged into 2.4.5 and 2.6.0 ? If not , then it's not big deal atm since 2.8 will be out at least in one year (but DST will change until then ;))) ) Another question: if I call ReReadTimeZone, it'll just do what it's name says, next Now() call will return correct result ? Thanks for your time over this problem. zeljko
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel