VB UTC+8校正 源码

小歆12年前软件源码04668
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

相关文章

[C语言]贪吃蛇源码

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

APK编辑工具(编译 and 反编译)绿色中文版

APK编辑工具(编译 and 反编译)绿色中文版

软件简介 apktool是apk反编译工具能够反编译及回编译apk,同时安装反编译系统apk所需要的framework-res框架,清理上次反编译文件夹等功能。 使用方法...

[C语言]用9行代码干掉Windows XP,2000

微软一直声称Windows XP多么多么稳定可靠,但日前一位名为Masaru Tsuchiyama(留在程序下方,所以应该是他的昵称)外国编程爱好者刊出了一小段C语言代码。这一只有9行的小程序如...

VC6.0-a.jpg

VC++6.0(windows7兼容版)下载【中/英】

Visual C++ 6.0 windows7兼容版 VC6.0安装版,完美支持Win7和Win XP系统,亲测可用,在Windows7 64位和 Wind...

C语言深度解剖 封面.jpg

[PDF]C语言深度解剖

C语言深度解剖   目录: 下载地址:        小歆网盘:C语言深度解剖(848.41 KB...

c-free 3.5.jpg

C-Free 针对C/C++初学者的集成化开发环境

C-Free是针对C/C++初学者的集成化开发环境 开发: C-Free开发工具: Borland C++ Builder 6.0 C-Free中使用的编译...

发表评论    

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