VB UTC+8校正 源码

小歆12年前软件源码04757
Function HttpGet(url)

    With CreateObject("Msxml2.ServerXMLHTTP")
        .open "GET", url, False
        .send
        HttpGet = .responseText
    End With

End Function

Private Sub cmd_Click()
    Dim aa As Date
        a = HttpGet("http://open.baidu.com/special/time/")
        a = Split(a, "window.baidu_time(")
        a = Split(a(1), ");")
        a = a(0)
        a = a / 1000
        aa = #1/1/1970#
        a = DateAdd("s", a, "1970-1-1 0:0:0")
        a = DateAdd("h", 8, a)
        lblLabel1.Caption = a
        lblLabel2.Caption = Now
        a = Split(a, " ")
        Date = a(0)
        Time = a(1)
    MsgBox "校正完毕", vbInformation, ""
End Sub

Private Sub Form_Load()
  a = HttpGet("http://open.baidu.com/special/time/")
        a = Split(a, "window.baidu_time(")
        a = Split(a(1), ");")
        a = a(0)
        a = a / 1000
        aa = #1/1/1970#
        a = DateAdd("s", a, "1970-1-1 0:0:0")
        a = DateAdd("h", 8, a)
        lblLabel1.Caption = a
        lblLabel2.Caption = Now
End Sub

相关文章

555集成电路应用800例.jpg

555集成电路应用800例(新编版)

555集成电路应用800例(新编版)        新编555集成电路应用800例电路4余例而成。本书在简要介绍时基电路5...

【VB源码】LOL昵称查询QQ号工具V1.0

【VB源码】LOL昵称查询QQ号工具V1.0

名称:LOL昵称查询QQ号工具V1.0 作者:小歆 说明:通过腾讯的游戏人生来获取的... 源码下载: 【VB源码】LOL昵称查询QQ号工具.rar 程序下载...

VIP会员试用抵价券发放活动

VIP会员试用抵价券发放活动    为了让广大网友更多的体验小歆工作室的各项服务 从2013年3月30日开启截止至2013年5月31日...

MX3205简介.png

移动电源三合一5V(1A-2A)方案

移动电源三合一5V(1A-2A)方案 & N5 F7 R0 R0 | 下载地址 & B9 n/ V$ }- w   &...

云流Bt资源搜索3.2,查看资源预览图+列表/超强引擎!

云流Bt资源搜索3.2,查看资源预览图+列表/超强引擎!

云流Bt资源搜索V3.2 软件说明:8 r4 F6 l' n; H6 W& o6 J7 H 1.可查看资源预览图+文件列表。: y! i2 P4 N1 X&...

[C语言]贪吃蛇源码

#define N 200 #include <graphics.h> #include <stdlib.h> #include <dos.h> #defi...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。