Valhalla Legends Forums Archive | Battle.net Bot Development References | GetTimeZone Information

AuthorMessageTime
ChR0NiC
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??
February 7, 2004, 1:32 AM
Spht
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.
February 7, 2004, 2:51 AM
Myndfyr
I believe he was looking for this:

[code]
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
[/code]

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.
February 7, 2004, 9:30 AM

Search