supu123
(supriys)
1
Hi Team,
I want to extract server time with I m able to do in chrome console using below code
let srvsec = new Date(fetch_server_time()).getseconds();
let srvms = new Date(fetch_server_time()).getmilliseconds();
console.log(srvsec+“:”+srvms);
but when I m using Inject java script activity getting an error
syntax error unexpected identifier
Unable to fetch what is the error
Thanks and Regards,
Supriya Yenaganti
loginerror
(Maciej Kuźmicz)
2
Hi @supu123
Could you please share some screenshots of how you configured it in Studio?
ppr
(Peter Preuss)
3
looks like following that we can do directly within Studio:

supu123
(supriys)
4
Hi @ppr
This is system time correct?
I want website server time
loginerror
(Maciej Kuźmicz)
6
Thank your for the extra context. It looks like there might be the return missing, as per our documentation and the sample script provided there:
supu123
(supriys)
7
Hi @loginerror
Error message coming up as fetch_server_time() not defined