Reputation: 1371
I am facing very weird issue and I can't even identify origins of it. Maybe someone can tell where I at least should look.
I have a input field with a calendar, which is disabled. Basically it's aim to showcase which date was chosen by a user for a certain document, but doesn't let to change it.
I am checking with .should('have.value', '01.01.2023 08:00')
and locally it passes. I push code to gitlab and the pipeline throws the error, that the time doesn't match, so it's 01.01.2023 09:00
, I try another input and the time difference there is two hours, so the problem is not the time zone, nor those are user settings. Also tried to hardcode those. What is gitlab CI doing here, why it renders a different time, than my localhost, with the testing data base being the same?
Upvotes: 2
Views: 259
Reputation: 1323553
As mentioned here, GitLab runners use UTC timezone, which would explain the time shift between actual and expected.
I try another input and the time difference there is two hours, so the problem is not the time zone
It might still be related to the fixed timezone used by the runner (UTC) which makes it "render" your input in that one UTC zone.
(assuming "another input" was another different input. If the runner display the same input differently on two different execution, that would be problematic)
Upvotes: 1