|
-
July 21st, 2010, 03:18 AM
#1
Need Help displaying local time zone, please.
Hi 
I would like to know how I can display the local time zone in a label but not just the GMT offset, I want the whole deal like Windows does.
example: (GMT+/- offset)nameofcity
Thanks to a snippet I found online I am able to populate a listbox with all of the Windows XP dafault time zones however I can't work out how to extract just the local TZ from the system.
I'm using VB6, MSDN is way over my head as I'm not up to speed with the lingo. 
I learn better by example(s).
Any help would be greatly appreciated. Thank you.
BTW, I already have a Mod with the following:
Code:
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 REGTIMEZONEINFORMATION
Bias As Long
StandardBias As Long
DaylightBias As Long
StandardDate As SYSTEMTIME
DaylightDate As SYSTEMTIME
End Type
Private Type TIME_ZONE_INFORMATION
Bias As Long
StandardName(31) As Integer
StandardDate As SYSTEMTIME
StandardBias As Long
DaylightName(31) As Integer
DaylightDate As SYSTEMTIME
DaylightBias As Long
End Type
Private Const TIME_ZONE_ID_INVALID = &HFFFFFFFF
Private Const TIME_ZONE_ID_UNKNOWN = 0
Private Const TIME_ZONE_ID_STANDARD = 1
Private Const TIME_ZONE_ID_DAYLIGHT = 2
Private Declare Function GetTimeZoneInformation Lib "kernel32" _
(lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long
Last edited by AccadaccA; July 21st, 2010 at 09:26 PM.
Reason: UNRESOLVED
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|