Skip to main content
1-Visitor
January 7, 2020
Solved

Updating time of a property in Thingworx using lua

  • January 7, 2020
  • 6 replies
  • 2429 views

Hi,

Trying to update time of the property on thingworx using following code

ts = 1578034820000    -epoch unix time in miliseconds

local data = {}
data.value = valore
data.time = ts
data.quality = "Good"
me:setProperty(nome, nil, nil, data)

 

,but except time it is updating value and quality of the property.

 

Tried to update after converting ts into different formats, but in vain.

Thank you!

 

Best Regards,

Naeem

Best answer by c_lowy

Hello @mnaeem ,

 

We just created the following article that clarifies this behavior and should help you with the issue you encountered : Timestamp is lost when pushing property from Lua Script Resource in ThingWorx.

 

Best regards,

Charlotte Lowy

6 replies

16-Pearl
January 16, 2020

We can reproduce this behavior and we will open a case in you name for further investigation.

Regards.

mnaeem1-VisitorAuthor
1-Visitor
January 16, 2020

Thank you @smainente ,

I really need assistance in this issue.

I'd be really thankful to you.

 

Best Regards,

Muhammad Naeem Akhtar

c_lowy16-PearlAnswer
16-Pearl
January 17, 2020

Hello @mnaeem ,

 

We just created the following article that clarifies this behavior and should help you with the issue you encountered : Timestamp is lost when pushing property from Lua Script Resource in ThingWorx.

 

Best regards,

Charlotte Lowy