# toDate() ignores locale from config?

**URL:** <https://forum.getkirby.com/t/todate-ignores-locale-from-config/26761>\
**Category:** Questions\
**Tags:** v3\
**Created:** [October 18, 2022, 1:47pm UTC](https://forum.getkirby.com/t/todate-ignores-locale-from-config/26761 "2022-10-18T13:47:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![getflourish](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/getflourish/32/4033_2.png) [@getflourish](https://forum.getkirby.com/u/getflourish)\
**Post date:** [October 18, 2022, 1:47pm UTC](https://forum.getkirby.com/t/todate-ignores-locale-from-config/26761/1 "2022-10-18T13:47:35Z")

</div>

I’m outputting a date with “intl” and German locales. Works on localhost and one server. But shows up in English on a different server.

`<?= $page->date()->toDate('cccc, d. LLLL YYYY') ?>`

Config:

```auto
'date' => [
  'handler' => 'intl'
],
'locale' => [
  LC_ALL => 'de_CH.UTF-8',
  LC_COLLATE => 'de_CH.UTF-8',
  LC_MONETARY => 'de_CH.UTF-8',
  LC_NUMERIC => 'de_CH.UTF-8',
  LC_TIME => 'de_CH.UTF-8',
  LC_MESSAGES => 'de_CH.UTF-8',
  LC_CTYPE => 'de_CH.UTF-8'
],

```

→ Server A: **Donnerstag** , 3. November 2022, 19.30 Uhr  
→ Server B: **Thursday** , 3. November 2022, 19.30 Uhr

How can I fix this?

---

<div class="post-metadata">

**Author:** ![getflourish](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/getflourish/32/4033_2.png) [@getflourish](https://forum.getkirby.com/u/getflourish)\
**Post date:** [October 18, 2022, 1:50pm UTC](https://forum.getkirby.com/t/todate-ignores-locale-from-config/26761/2 "2022-10-18T13:50:13Z")

</div>

Seeing this issue on Github now:

> <https://github.com/getkirby/kirby/issues/4304>
>
> \## Description
> Using the new \`intl\` date handler on a multilanguage site, the d…ate output language is picked randomly from the available languages.
> 
> 
> \*\*Expected behavior\*\*  
> Date output language correponds to the current selected language.
> 
> \*\*Video of the behavior\*\*  
> \[See video\](https://cln.sh/BO5pbm)
> 
> 
> \## To reproduce
> On a fresh install of Kirby 3.6.6
> 
> 1. Configure the site to have languages available and \`intl\` as the date handler:
> \`\`\`php
> // config.php
> return \[
> 'languages' =\> true,
> 'date.handler' =\> 'intl',
> \]
> \`\`\`
> 2. Add two languages:
> \`\`\`php
> // languages/lt.php
> return \[
> 'code' =\> 'lt',
> 'default' =\> true,
> 'direction' =\> 'ltr',
> 'locale' =\> \[
> 'LC\_ALL' =\> 'lt\_LT'
> \],
> 'name' =\> 'Lietuvių',
> \]
> \`\`\`
> 
> \`\`\`php
> // languages/en.php
> return \[
> 'code' =\> 'en',
> 'default' =\> false,
> 'direction' =\> 'ltr',
> 'locale' =\> \[
> 'LC\_ALL' =\> 'en\_US'
> \],
> 'name' =\> 'English',
> \]
> \`\`\`
> 
> 3. Ouput the date with month as a word:
> 
> \`\`\`php
> // somewhere in the template
> \<span\>\<?= $page-\>date()-\>toDate('Y, LLLL') ?\>\</span\>
> \`\`\`
> 4. Reload browser multiple times. (Sometimes it stays in one language for 10 reloads, sometimes it changes every second reload).

I’m on 3.7.2.1 and I guess I need to update Kirby then.
