PDA

View Full Version : EQTime off by 1 hour



Elyon
10-02-2003, 01:41 PM
I noticed that the EQTime on the Status bar in SEQ is off by an hour. An easy fix, is to change line 3255 in Packet.ccp from -1 to -2 and it seems to correct the problem. Doesn't seem worth it to submit a patch for this.

Zaphod
10-02-2003, 03:06 PM
Originally posted by Elyon
I noticed that the EQTime on the Status bar in SEQ is off by an hour. An easy fix, is to change line 3255 in Packet.ccp from -1 to -2 and it seems to correct the problem. Doesn't seem worth it to submit a patch for this.

You appear to be correct, the time does appear to be off 1 hour. The really strange thing is that this code hasn't changed in a long time and I know it used to work. I'm going to do some more research into this because the timezone of the server should not have an effect on this calculation, since the reference time and the time passed into getEQTimeOfDay to perform the calculation of the new EQ time are both from the time() system call on your local system (unless you make it a habbit of changing your local time zones). Maybe SOE rebased the hour passed in the timeOfDayStruct.

Enjoy,
Zaphod (dohpaZ)

Zaphod
10-02-2003, 04:25 PM
OK, I just put some code in to check, and indeed EQ has rebased there time for whatever reason. The hour field in the timeOfDayStruct is now 1 hour higher then what is displayey in EQ's /time command.

As an example when zoning in I got the TimeOfDayCode handlers message (which prints the raw times from the timeOfDayStruct):

TIME: 03:09 06/08/3175


As soon as I finished zoning in I did the '/time' command and got the following:

Game Time: Sunday, June 08, 3175 - 2 AM


As such it requires a slightly different fix, because the base change effects other calculations in ShowEQ and not just that time display. It will be fixed in my next CVS commit.

Enjoy,
Zaphod (dohpaZ).

ThanosOfTitan
10-03-2003, 08:18 AM
One has to wonder, is EQ on daylight savings time?

Ratt
10-03-2003, 12:52 PM
I believe that change was put in to handle DST changes on the server RTC... if you recall in years past, DST changes always wrecked havok with the game itself.

Why they don't just coordinate to UTC is a mystery... it's not like the servers need to be on US time for any given reason... and anything that needs to be done at xxx hour of the day in the local time zone could be adjusted for... and thus you'd never have to flop around on DST/ST ...

Legacy code in all it's glory. :)

S_B_R
10-03-2003, 02:11 PM
It's a sign of poor system administration, and/or Poor system planning/design. It looks as though the entire platform was developed on someones workstaion then the production environment was built around that.

Zulu TZ > ALL TZ ;)

guice
10-06-2003, 03:23 PM
well, if my history lessons are correct; EQ was built in a short time frame with no hopes of becoming to be any real successful product.

I forget all the explicit details, but I do recall that EQ wasn't taken very lightly as a game and took many upon many of talks just to convince Varent to give it a try. EQ was a rush job that turned overly successful, beyond it's original projections (about 1000 fold is a good esitmate I think).