2009-10-06 71 views

回答

0

使用任何TZ;只需使用該行添加小時:

anytime = DateAdd("H", HOUR_DIFFERENCE, Now()) 
-1
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 
+0

不能使用ASP頁面? – Tom 2009-10-06 13:41:17

+0

考慮到你發佈了很多簡單的問題,湯姆不會降級,我很樂意提供幫助。在你的編碼任務中給出更多的細節,比如什麼語言,你標記了asp和vb ..所以我們不是介意讀者。對你感到羞恥...... – JonH 2009-10-06 19:25:54

+1

對不起,ASP似乎不支持調用kernel32 ...我自己想到了解決方案並已經回答了。 – Tom 2009-10-08 10:34:48