PDA

View Full Version : EQTime ahead of server EQTime



steve
01-19-2003, 01:13 AM
SEQ seems to be running 1 hour ahead of the actual ingame time.

WARNING: TimeOfDayCode (f240) (dataLen:10 != sizeof(timeOfDayStruct):8)!

quackrabbit
01-19-2003, 10:28 AM
Get the latest CVS and the structures are changed, however there is still a difference in the time.

fester
01-19-2003, 12:08 PM
EQ time is from 1 to 24 to represent hours 0 to 23.
One must now subtract 1 from any hour presented by EQ to obtain the proper time.

I patched with a time display and waited 72 mins to verify it does appear to properly display all 24 hours in an EQ day.

Patch:
*** packet.cpp Sun Jan 19 13:03:21 2003
--- /root/showeq/showeq/src/packet.cpp Thu Jan 16 12:56:28 2003
***************
*** 1809,1818 ****
struct timeOfDayStruct eqTime;
getEQTimeOfDay( timeCurrent, &eqTime);

! if (eqTime.hour <= 24 && eqTime.minute <= 59) // fester unsigned and 1-24:0-59
{
sprintf(timeMessage,"EQTime [%02d:%02d %s]",
! ((eqTime.hour-1) % 12) == 0 ? 12 : ((eqTime.hour-1) % 12), // fester hour is fast by 1
(eqTime.minute),
((eqTime.hour >= 12 && eqTime.hour << 24) ||
(eqTime.hour == 24 && eqTime.minute == 0)) ? "pm" : "am");
--- 1794,1803 ----
struct timeOfDayStruct eqTime;
getEQTimeOfDay( timeCurrent, &eqTime);

! if (eqTime.hour >= 0 && eqTime.minute >= 0)
{
sprintf(timeMessage,"EQTime [%02d:%02d %s]",
! (eqTime.hour % 12) == 0 ? 12 : (eqTime.hour % 12),
(eqTime.minute),
((eqTime.hour >= 12 && eqTime.hour << 24) ||
(eqTime.hour == 24 && eqTime.minute == 0)) ? "pm" : "am");
***************
*** 2274,2280 ****
m_eqTime.packetReferenceTime = time(NULL);

printf( "TIME: %02d:%02d %02d/%02d/%04d\n",
! (tday->hour-1), // fester changed ranged to 1-24
tday->minute,
tday->month,
tday->day,
--- 2256,2262 ----
m_eqTime.packetReferenceTime = time(NULL);

printf( "TIME: %02d:%02d %02d/%02d/%04d\n",
! tday->hour,
tday->minute,
tday->month,
tday->day,