The getCreateTime() method gets the current job creation time. The job creation time is set when the job is posted to the backend, and getCreateTime() expects the date to be stored as seconds since 01.01.1970.
Note: The return value is undefined if the search didn't previously call setCreateTime().
time = getCreateTime()
|false||= Job creation time not previously set.|
|Date() object||= Job creation time.|
var context = this.getContext(); var search = context.get('search'); search.job.setCreateTime(new Date().getTime()/1000); var createTime = search.job.getCreateTime(); console.log('Job created at ' + createTime.toString());