venkat sai
venkat sai

Reputation: 475

How to get current UTC time in unix format in jmeter

I am testing a RestFul server which takes time stamp in header to evaluate expiry of http call, the server accepts UTC time in unix format Eg: https://www.unixtimestamp.com/ number in this website.

so how to generate the time stamp and put it in header of http call in jmeter

enter image description here

I have used this approach, but when i convert it using the same website i have mentioned above it is giving me a wrong date

Upvotes: 1

Views: 639

Answers (1)

Masud Jahan
Masud Jahan

Reputation: 2978

Use __time function:

The time function returns the current time in various formats.

Use the ${__time()} in your header to get the time in Unix format.

Check this example:

enter image description here

Upvotes: 0

Related Questions