Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

DateTime values and conversion between VDs and GVs?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DateTime values and conversion between VDs and GVs?

    So I was hacking some things on my HS3 (Linux), and one of the items on today's agenda is to move a DateTime value from a VD (Virtual Device) DeviceString property to/from a GV (Global Variable) DateTime. Now the funny thing is, when I run some code like:
    Code:
    &hs.setDeviceString(592,FormatDateTime(cstr(hs.GetVar("gv_tod_vacation_from"))),False)
    Well if the GV has a value of "01/08/2018 00:00:01" it will be transformed to only date "01/08/2018".
    Now if the GV has a value of "01/08/2018 01:00:00" it will be fully moved over so it still is "01/08/2018 01:00:00".

    So then I decided to test:
    Code:
    &hs.setDeviceString(592,DateTime.parse(FormatDateTime(cstr(hs.GetVar("gv_tod_vacation_from")))),False)
    No difference.

    Any idea where I turn wrong here? Why is a DateTime value with 00:00:01 lost in the translation so to speak? Anything I need to know kind of?
Working...
X