i’m trying to initiate transaction via rest api using following code:
var timeStamp = d1.getTime();
var deadline = d1.getTime() + 1000;
var params = {
RequestPrepareAnnounce: {
“transaction”:
{
“timeStamp”: Math.round(timeStamp/1000),
“amount”: 1000000,
“fee”: 500000,
“recipient”: “TAOM33POIATPNENGTRE4VTWVN4W32J3GCZTVG6LF”,
“type”: 257,
“deadline”: Math.round(deadline/1000),
…
}
but everytime i got FAILURE_TIMESTAMP_TOO_FAR_IN_FUTURE. how to use correct timespan and deadline? i’m using the local time of my computer.