citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
456 stars 134 forks source link

How to set citrus:currentDate to UTC #1081

Open petervalencic opened 9 months ago

petervalencic commented 9 months ago

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>
bbortt commented 9 months ago

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