Jump to content
The simFlight Network Forums

Getting local time from FS

Recommended Posts

I'm trying to get local time (hours and minutes), but I sometimes get a very high number, like 14453. Sometimes I get the correct hour and minute, like Hr=14 Min=22

Here's how I read FSUIPC:

If FSUIPC_Read(&H238, 1, VarPtr(Tmp), dwResult) Then

If FSUIPC_Process(dwResult) Then

LocHr = Tmp

End If

End If

Any thoughts?

Link to comment
Share on other sites

Dim auiTime() As Byte
ReDim auiTime(3)

  FSUIPC_Read(&H238, 3, VarPtr(auiTime(1)), dwResult)    

  lblClock.Caption = Format(auiTime(1), "00") & ":" & _
                         Format(auiTime(2), "00") & ":" & _
                         Format(auiTime(3), "00")

Straight out of the SDK


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.