Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

phreshphish's avatar

Date fields always in US format within Dusk tests

When running dusk tests, date fields within the test are always in US format but I required them to be in British format. My chrome options look like this:

$options = (new ChromeOptions)->addArguments([
            '--disable-gpu',
            '--headless',
            '--no-sandbox',
            '--ignore-ssl-errors',
            '--whitelisted-ips=""',
            '--window-size=1920,1080',
            '--lang=en_GB',
        ]);

In my dusk test case file I am also setting the locale using:

app()->setLocale('en');

Edit: I have also tried setting the language to 'en-GB'

0 likes
0 replies

Please or to participate in this conversation.