首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

关于设置系统时间解决方法

2012-01-09 
关于设置系统时间我用SetSystemTime设置系统时间,其他的都对,就是小时数不对,好像总是多8个小时不知道是怎

关于设置系统时间
我用   SetSystemTime   设置系统时间,其他的都对,就是小时数不对,好像总是多8个小时不知道是怎么回事?
        dt1.wYear   =   Year(t1)
        dt1.wMonth   =   Month(t1)
        dt1.wDay   =   Day(t1)
        dt1.wHour   =   Hour(t2)
        dt1.wMinute   =   Minute(t2)
        dt1.wSecond   =   Second(t2)
       
        SetSystemTime   dt1


[解决办法]
Declare Function SetLocalTime Lib "kernel32 " Alias "SetLocalTime " (lpSystemTime As SYSTEMTIME) As Long
用这个api你那个是设置 成英国伦敦的时间 就是格林尼治时间

热点排行