Failure timestamp too far in future

PS:- please someone help me with these issues I am facing this on the testnet…can anyone provide me the proper endpoint for the nem testnet

nem.default.com.requests.chain.time(endpoint).then(function (timeStamp) {
timestamp===> { sendTimeStamp: 138004545820, receiveTimeStamp: 138004545820 }
//First I tried this
const NEM_EPOCH = Date.UTC(2015, 2, 29, 0, 6, 25, 0);
const ts = Math.floor(Date.now() / 1000 - NEM_EPOCH / 1000);
console.log(“timestamp===>”, timeStamp);
apostille.timeStamp = ts;
const due = 60;
apostille.deadline = ts + due * 60;
//second I tried this
console.log(“timestamp===>”, timeStamp);
const ts = Math.floor(timeStamp.receiveTimeStamp / 1000);
apostille.timeStamp = ts;
const due = 60;
apostille.deadline = ts + due * 60;

//third simply I didn’t alter any of the timestamps before sending but for all three cases getting the same error…
// Serialize transfer transaction and announce
nem.default.model.transactions.send(common, apostille.transaction, endpoint).then(function (res) {});

output : - { innerTransactionHash:
{ data:
‘348997e24402728a8fb9092ca197ab2b4e0165a1fb75bc64f5591a99e3026afb’ },
code: 10,
type: 1,
message: ‘FAILURE_TIMESTAMP_TOO_FAR_IN_FUTURE’,
transactionHash:
{ data:
‘3575d435a49d86425fb4d42af354d0bdfd19cb7e907c10c0528230b2e8d7d483’ } }

I would debug and check if timestamp is set correctly. For example print timestamp and entity before serialization.