msarossy wrote:

I have FB1.5 running on windows 2k server sp4. Australia changed to daylight savings a couple of weeks ago and the windows system clock changed automatically. The FB server nor windows had been restarted . The software we have which uses BDE to connect to FB presumably used queries using the "NOW" or similar SQL keyword and have been getting the old time (one hour behind) despite the windows clock reading correctly.

Can someone explain to me the relationship between the FBserver time and the windows system time and how frequently the two are synchronised ?

Helen Borrie answers:

There is no relationship between Fb server time and Windows time. Fb server time is whatever the current BIOS clock time is.

When you change Windows time it's a lottery, whereby one of three things will happen at random:

  1. Windows immediately makes a deep call to adjust the system clock. I don't think it has done this since Win98.
  2. Windows writes the "Windows time" somewhere and synchronises the system clock at power down or reboot. I seem to be getting this behaviour on Win2K SP4.
  3. Windows gives you the option of synchronising. I've been told this is what happens with XP and its relatives.
  4. And there might be something else with Vista.

In short, Fb always reads the system clock, on all platforms, so it is amongst your "absolute need-to-knows" if running servers under Windows, to know how your particular installation will behave. Hence, it is a VERY good reason to peg time-dependent ops firmly to UTC time at the SERVER. It takes moments to set up with an on-line service. And never to use Delphi's Now() function for recording timestamps. Firebird gives you context variables and special time literals to get your various server-based times and dates.

Like this post? Share on: TwitterFacebookEmail

Related Articles


Firebird Community



Gems from Firebird Support list