citrus icon indicating copy to clipboard operation
citrus copied to clipboard

How to set citrus:currentDate to UTC

Open petervalencic opened this issue 2 years ago • 1 comments

Citrus Version Citrus 2.8.0

Question Is there a way to set a currentDate to UTC?

What I've tried so far In my country, I've adjusted the time by subtracting 1 hour as demonstrated below. However, within the GitLab pipeline, there's a server configured with UTC dateTime. Consequently, I'll need to modify the variable when concluding testing on my local PC…

<variables>
<variable name="now" value="citrus:currentDate('yyyy-MM-dd'T'HH:mm:ss'Z'','-1h')" />
</variables>

petervalencic avatar Dec 05 '23 12:12 petervalencic

I don't think that function exists currently... sorry. one would have to write it.

bbortt avatar Dec 08 '23 06:12 bbortt