Skip to main content
Jan 7, 2020 2:04 PM UTC
Solved

Updating time of a property in Thingworx using lua

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

c_lowyAnswer
Jan 17, 2020 8:21 AM UTC

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

Jan 16, 2020 8:52 AM UTC

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

Regards.

mnaeemAuthor
Jan 16, 2020 10:30 AM UTC

Thank you @smainente ,

I really need assistance in this issue.

I'd be really thankful to you.

 

Best Regards,

Muhammad Naeem Akhtar

c_lowyAnswer
Jan 17, 2020 8:21 AM UTC

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