Summer Sale! All accounts are 50% off this week.

arwinvdv's avatar

Dusk: Set timezone for selenium

Hi,

I have a problem with Bitbucket Pipelines in combination with Laravel Dusk and timezone settings. When I run php artisan dusk the wrong timezone is set for Chrome. I have already added this lines:

cp -f /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
export TZ=Europe/Amsterdam

And I tried TZ=Europe/Amsterdam php artisan dusk but that won't solve the problem.

The solution in this thread is maybe also the solution of my problem, but I don't know how to translate it to Dusk: https://stackoverflow.com/questions/44688079/how-do-i-set-a-timezone-in-selenium-chromedriver

Anyone know how to solve this?

0 likes
1 reply
arwinvdv's avatar

I have found a fix, I had to specify the variable in the definition:

definitions:
    services:
        chrome:
            image: drupalci/chromedriver:dev
            variables:
                TZ: Europe/Amsterdam

Please or to participate in this conversation.