Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Lenny on June 19, 2004, 01:15 AM

Title: Time Zone Bias
Post by: Lenny on June 19, 2004, 01:15 AM
I believe battle.net changed the sending of the TimeZoneBias in 0x50

Instead of being the (actual Bias) in minutes, it seems to be the (actual Bias - 60) minutes.

Perhaps an update in BnetDocs is in order?
Title: Re:Time Zone Bias
Post by: Soul Taker on June 19, 2004, 03:18 AM
Quote from: Lenny on June 19, 2004, 01:15 AM
I believe battle.net changed the sending of the TimeZoneBias in 0x50

Instead of being the (actual Bias) in minutes, it seems to be the (actual Bias - 60) minutes.

Perhaps an update in BnetDocs is in order?
AFAIK, it's always been this way.
Title: Re:Time Zone Bias
Post by: Lenny on June 19, 2004, 03:49 AM
I have old Client logs that show otherwise...
Title: Re:Time Zone Bias
Post by: Zorm on June 19, 2004, 04:39 AM
The format is the same as it has always been. Maybe you are just missing something like daylight savings time or such?
Title: Re:Time Zone Bias
Post by: Lenny on June 19, 2004, 08:37 AM
Does .DaylightBias change in TIME_ZONE_INFORMATION depending on whether Daylight Savings Time is in effect?  Or does it always remain -60?

or

Does GetTimeZoneInformation() return TIME_ZONE_ID_DAYLIGHT or TIME_ZONE_ID_STANDARD depending on whether Daylight Savings Time is in effect?

MSDN is somewhat unclear on this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettimezoneinformation.asp
Title: Re:Time Zone Bias
Post by: Zorm on June 19, 2004, 09:38 AM
This is how I do it and it works fine.

DWORD ret = GetTimeZoneInformation(&tz);
LONG rBias = 0;
if (ret == TIME_ZONE_ID_DAYLIGHT)
   rBias = tz.Bias + tz.DaylightBias;
else if (ret == TIME_ZONE_ID_STANDARD)
   rBias = tz.Bias + tz.StandardBias;
else
   rBias = tz.Bias;
InsertDWORD(rBias);
Title: Re:Time Zone Bias
Post by: Lenny on June 19, 2004, 09:54 AM
Ah, so it was the second one.....