Thanks for your efforts sti, but I need a solution that purely uses the 
REST API, as I have no access to the Jenkins instances in question.  I'm a 
little surprised that there is no way to get this information, as the 
timestamps are fairly meaningless without some way to qualify them against 
the Jenkins server time.  I would have thought that the REST API call for 
the root resource should contain this.

On Monday, 30 July 2012 20:30:13 UTC+1, sti wrote:
>
> I couldn't find it in the REST API, but maybe something like: 
>
>     echo 'println new Date()' | java -jar jenkins-cli.jar -s $JENKINS_URL 
> groovy = 
>
> jenkins-cli.jar is available from your $JENKINS_URL/cli. The equals sign 
> at the end is not a typo. 
>
> -- Sami 
>
>
> > Is there any way to determine the current time on a Jenkins instance 
> through its REST API? 
> > 
> > I make use of the Jenkins REST API, and frequently come across resources 
> containing a timestamp field, from which I would like to calculate a 
> duration -- by subtracting from the current time.  Unfortunately, I am 
> having trouble getting a value for the current timestamp of the Jenkins 
> server, and using local time leaves me open timezone problems. 
> > 
> > Any help/advice gratefully received. 
> > 
> > -T 
>
>

Reply via email to