• Welcome to Valhalla Legends Archive.
 

GetTimeZone Information

Started by ChR0NiC, February 06, 2004, 07:32 PM

Previous topic - Next topic

ChR0NiC


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.

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.