Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set citrus:currentDate to UTC #1081

Open
petervalencic opened this issue Dec 5, 2023 · 1 comment
Open

How to set citrus:currentDate to UTC #1081

petervalencic opened this issue Dec 5, 2023 · 1 comment
Labels
good first issue A good point to start from for new contributrs Type: Enhancement

Comments

@petervalencic
Copy link

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
Copy link
Collaborator

bbortt commented Dec 8, 2023

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

@christophd christophd added Type: Enhancement good first issue A good point to start from for new contributrs labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good point to start from for new contributrs Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants