问题
how to display current time with chosen timezone instead of server TZ? (VB)
回答1:
to use any TZ; simply use this row to add hours:
anytime = DateAdd("H", HOUR_DIFFERENCE, Now())
回答2:
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
来源:https://stackoverflow.com/questions/1525615/how-to-display-current-time-with-chosen-timezone