Datetime Synchronizing

Hi, i have a few servers running QNX 6.3 with the time set in a custom timezone, for daylight savings time, but for some reason one of this machines returns a distinct unixtime.

Let me put a example:

For server1 (With no problems) the unixtime for ‘2009-04-13 12:00:00’ is 1239624000.

For server2 (the one with problems) the unixtime for the same datetime tag is: 1239627600

3600 seconds more than the other, but it has the same timezone configuration and files, anything is the same!!!

This causes me a lot of trouble because i have an application running and storing datetime data with unixtime format in a mysql database (with the command unix_timestamp()) and then export it to a MS Sql Server machine thant convert the numbers of unixtime to a datetime field and all the data of this machine shows 1 hour more than the others.

Excuse me for the poor english, if there’s any doubt about the text up here please tell me so i can figure a way to explain it better.

Regards.
Mario Camargo.

Mario,

First thing I’d do is check the BIOS on both machines to make sure the BIOS’s are in sync time wise.

Is there any chance you set up the ‘bad’ server to use/not use the RTC (real time clock from the BIOS).

Setting that differently on 2 nodes might cause your problem.

Tim

Hi, thanks for the tip, i’ve been trying to reproduce the error in another dev machine, and i notice that in this new server, when i change the timezone with the phlocal app the time changes automatically, and of course the unixtime values of any datetime tag are different to the values that returns the other machines, however, in the “bad” server, it doesn’t matter how many times i change the timezone the datetime of the machine remains (i don’t have the machine right here, it’s a remote node for trying the BIOS thing), and if i want some specific time i have tu put it manually and the unixtime values remains the same with any timezone y choose. It’s just weird.

Again, thanks, and any other ideas will be well received :smiley:

Mario.l

Done!

The problem was the global value “TZ”, it was set to “utc01” for an export sentence in one of the sh files that deal with the system initialization. The timezone “utc01” have erroneus data and when i change the tz in the phlocale app, the TZ value of the SO set it back to his original value. I think after all this was a comunication problem. But it’s solved.

Thanks for your time Tim.

Regards.
Mario Camargo.