VB声明 |
Declare Function GetTimeZoneInformation Lib
"kernel32" Alias "GetTimeZoneInformation" (lpTimeZoneInformation As
TIME_ZONE_INFORMATION) As Long |
说明 |
在一个TIME_ZONE_INFORMATION结构中载入与系统时区设置有关的信息 |
返回值 |
Long,下述常数之一: |
TIME_ZONE_ID_INVALID |
函数执行失败,会设置GetLastError |
TIME_ZONE_ID_UNKNOWN |
时区未知(可能仍然指定了bias值) |
TIME_ZONE_ID_STANDARD |
标准时间有效 |
TIME_ZONE_ID_DAYLIGHT |
夏令时有效 |
参数表 |
参数 |
类型及说明 |
lpTimeZoneInformation |
TIME_ZONE_INFORMATION,用于载入时区信息的结构 |
注解 |
在lpTimeZoneInformation结构中为本地时间添加bias信息,从而获得系统时间。TIME_ZONE_INFORMATION结构内部的DaylightName和StandardName字串肯定采用Unicode格式 |