0 Replies Latest reply on Jun 16, 2017 1:38 AM by dbologna RSS
    dbologna Apprentice

    Format of timestamp in Mqtt packet

    Hi All,

    PREMISE : I used Thingworx 7.4 on PTC cluster.

    I receive a set of properties from a mqtt packet that is sent by events.

    I must to use the value of timestamp contains the packet , then  I need to convert that timestamp (received indide the data packet)  in local time of Cloud.

    What is the correct format of timestamp that i must received ?

    The packet of properties that I receive is an  json string in this case I will use the statement to estract the timestamp like :

    var times=packet["TM_STAMP"];

    and use that value to create a local value of timestamp with the flollowing statement

    var loctime=new Date(times).

    and I used loctime tosave properties into stream.

    Is this the correct process ?

    Many Thanks