Valhalla Legends Archive

Programming => Battle.net Bot Development => Battle.net Bot Development References => Topic started by: ChR0NiC on February 06, 2004, 07:32 PM

Title: GetTimeZone Information
Post by: ChR0NiC on February 06, 2004, 07:32 PM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettimezoneinformation.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/gettimezoneinformation.asp)

Does anyone know how to do this in VB terms??
Title: Re:GetTimeZoneInformation
Post by: Spht on February 06, 2004, 08:51 PM
Not sure what the question was, but you should post your findings to make the thread useful and for an archived reference, or the thread gets deleted.
Title: Re:GetTimeZoneInformation
Post by: MyndFyre on February 07, 2004, 03:30 AM
I believe he was looking for this:


Private Declare Function GetTimeZoneInformation Lib _      
   "kernel32"(lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long

Private Type SYSTEMTIME
       wYear As Integer
       wMonth As Integer
       wDayOfWeek As Integer
       wDay As Integer
       wHour As Integer
       wMinute As Integer
       wSecond As Integer
       wMilliseconds As Integer
End Type

Private Type TIME_ZONE_INFORMATION
       Bias As Long
       StandardName(32) As Integer
       StandardDate As SYSTEMTIME
       StandardBias As Long
       DaylightName(32) As Integer
       DaylightDate As SYSTEMTIME
       DaylightBias As Long
End Type


Presumably you initialize an instance of TIME_ZONE_INFORMATION, pass it ByRef into GetTimeZoneInformation, and you're set.

Now here's the really pathetic thing about this....

I started Internet Explorer.  Google is my homepage.  I typed "visual basic gettimezoneinformation", because it doesn't use capitalizations.

The first result is:

http://www.devcity.net/forums/faq.asp?fid=9&cat=System#TID1881

which is exactly where I copied and pasted this code from.

I'm not a VB programmer or I might have just been able to come up with that off my head.  But come on man, did you even look at Google?

Spht, I'd suggest leaving this thread for future people who won't search for it anyway.