Home

Buy Now

Products
  InaAuthenticate
  InaAuthenticate.Net
  InaCalcStd (Free)
  InaCalcPro
  InaCalc.Net
  InaCardCheck
  InaCardCheck.Net
  InaClock
  InaClockCtrl
  InaClockCtrl.Net
  InaCryptCompress.Net
  InaEmailCheck
  InaEmailCheck.Net
  InaEmailSend
  InaFileConverter
  InaGrid
  InaSysTray
  InaUploadFile
  InaXplorer

  XComp (Free)

Support

About

Press Releases
   .Net
   InaAuthenticate
   InaCalc
   InaCardCheck
   InaClock
   InaEmailCheck
   InaEmailSend
   InaGrid
   InaUploadFile

ComponentSource Professional Partner

InaClockCtrl Demo Source


Dim m_strUTC
Dim m_strLocal
Dim m_strError

DoTime()

Sub DoTime
On Error Resume Next

m_strError = ""

Dim InaClockObject

Set InaClockObject = CreateObject("InaByte.InaClockCtrl")

' Set the default time server we are using
InaClockObject.TimeServer = "time.nist.gov"

' Using Proxy? - set lines below
'InaClockObject.UseProxy = True
'InaClockObject.ProxyServer = myProxyServer
'InaClockObject.UseConnect = True
'InaClockObject.ProxyPort = 80
'InaClockObject.ProxyAuth = "username:password"

' Using RAS (DUN)? - set lines below
'InaClockObject.UseRas = True
'InaClockObject.RasAuth = "username:password"

' Get UTC
m_strUTC = InaClockObject.GetUTC()

If m_strUTC <> 0 Then
    ' Get Local Time from UTC
    m_strLocal = InaClockObject.UTCToLocal(m_strUTC)
Else
    ' Default time server failed!
    
' Get UTC from our InaClock server
    InaClockObject.TimeServer = "ourtimeserver"
    m_strUTC = InaClockObject.GetUTC()
    If m_strUTC <> 0 Then
        m_strLocal = InaClockObject.UTCToLocal(m_strUTC)
    Else
        m_strError = "Error: Could not retrieve the time"
    End If
End If

End Sub


Home Products Support About Press Releases

Copyright © 1996 - 2005 by Inabyte Inc., Novato, California, USA
Last modified: Sunday, September 02, 2001 10:21

Inabyte Inc.
5 Betty Lane
Novato CA 94947
Phone: +1 415 898 7905
Fax: +1 415 898 1652