Unix Timestamp or epoch time in connector



I am trying to build a new connector where I need to add the unix_timestamp into the header.


How do I get the epoch/unix timestamp?


This is A string that contains the a long value that represents the current time in milliseconds since midnight, January 1, 1970 UTC.



Best Answer

  • GrantSmith
    GrantSmith Indiana 🟤
    Accepted Answer



    Assuming you're doing this in JavaScript you can utilize the getTime function:


    var ts = Math.round((new Date()).getTime() / 1000);


    The above example uses the current timestamp but you can swap out the new Date() call with a different date if necessary.

Sign In or Register to comment.

Hey, Stranger!

It looks like you're new here. Those who sign in get access to engage with even MORE fire content. To get involved, click one of these buttons!