VBScript获取给定Timezone的Date

Function Get_TimeZone_Specified_Date_by_GMTHour(intHour)
	n = Now
	set oShell = CreateObject("WScript.Shell") 
	atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\" &"Control\TimeZoneInformation\ActiveTimeBias"
	offsetMin = oShell.RegRead(atb) 
	n = dateadd("n", offsetMin, n) 
	Get_TimeZone_Specified_Date_by_GMTHour = dateadd("h", intHour, n) 
End Function
 

你可能感兴趣的:(VBScript)