views:

67

answers:

2

how to display current time with chosen timezone instead of server TZ? (VB)

A: 
Public Declare Function GetTimeZoneInformation Lib "kernel32" Alias 
"GetTimeZoneInformation" (lpTimeZoneInformation As 
TIME_ZONE_INFORMATION) As Long 

Public 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 

GMT = systemtime + bias
JonH
not working with ASP page?
Tom
Tom don't downgrade considering you have been posting a lot of easy questions and I've been happy to help. Give MORE details in your coding assignments like what language, you tagged both asp and vb..so we are not mind readers. Shame on you...
JonH
Sorry but ASP does not seem to support calling kernel32... I figured the solution myself and answered already.
Tom
A: 

to use any TZ; simply use this row to add hours:

anytime = DateAdd("H", HOUR_DIFFERENCE, Now())
Tom