X10 Community Forum
🖥️ActiveHome Pro => SDK => Topic started by: hkactive on May 15, 2006, 04:38:30 PM
-
Hi:
Am using the following VB6 code using the ActiveHome control with a CM15A. And I am using a PowerHouse Platinum Remote (UR73A) to send the signal to the CM15A.
Private Sub ActiveHome1_RecvAction(ByVal bszAction As Variant, ByVal bszParm1 As Variant, _
ByVal bszParm2 As Variant, ByVal bszParm3 As Variant, ByVal bszParm4 As Variant, _
ByVal bszParm5 As Variant, ByVal bszReserved As Variant)
If bszParm1 = vbNullString Then bszParm1 = "null-1"
If bszParm2 = vbNullString Then bszParm2 = "null-2"
If bszParm3 = vbNullString Then bszParm3 = "null-3"
If bszParm4 = vbNullString Then bszParm4 = "null-4"
If bszParm5 = vbNullString Then bszParm5 = "null-5"
If bszReserved = vbNullString Then bszReserved = "Reserved-Null"
Debug.Print bszAction, bszParm1, bszParm2, bszParm3, bszParm4, bszParm5, bszReserved
End Sub
This is what prints out when the Receive Event is triggered by the CM15A:
recvrf e1 Off 0 5/15/2006 8:17:15 PM null-5 Reserved-Null
However, the actual time on my computer is 4:17 p.m.
Anybody know why there is an exact 4 hour difference? And possibly how to rectify the situation so that the time matches the computer time?
Thanks,
Hank
-
What Timezone are you in? My guess is that it is returning the time in UTC. Check if VB has a function for converting from UTC to local time.
-
I'm in the Eastern Standard Time (EST) Zone.
Right now it's 4:45 p.m.
Latest result:
recvrf f1 On 0 5/15/2006 8:46:00 PM null-5 Reserved-Null
Using the print now function in the debug window produces the following.
print now
5/15/2006 4:46:53 PM
Looks like the CM15A is converting the time and not VB?
Hank
-
Yes, it uses UTC, but it's not just the CM15A the CM19A also reports UTC.
I believe it's coming from the X10Nets service.
You need to convert UTC to local time in VB.