# Default locale

**URL:** <https://dev.lucee.org/t/default-locale/17946>\
**Category:** support\
**Created:** [November 26, 2026, 3:32pm UTC](https://dev.lucee.org/t/default-locale/17946 "2026-11-26T15:32:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![thefalken](https://dev.lucee.org/user_avatar/dev.lucee.org/thefalken/32/57_2.png) [@thefalken](https://dev.lucee.org/u/thefalken)\
**Post date:** [November 26, 2026, 3:32pm UTC](https://dev.lucee.org/t/default-locale/17946/1 "2026-11-26T15:32:23Z")

</div>

We’re trying to track down a formatting change, where it looks like we expect the implicit locale to be en\_GB, or at least dd-mm-yyyy for (ls)dateformat(), but it no longer is.

I’ve read [Date and Time Formatting in Lucee :: Lucee Documentation](https://docs.lucee.org/recipes/date-time-formatting.html) which explains the default locale comes from .CFConfig.json then Application.cfc, then runtime.

Suppose I do not specify any of those locations - where does the default locale come from then ? Does Lucee fall back to checking some environment variable or JVM setting or something ?

---

<div class="post-metadata">

**Author:** ![GianTschingt](https://dev.lucee.org/user_avatar/dev.lucee.org/giantschingt/32/9300_2.png) [@GianTschingt](https://dev.lucee.org/u/GianTschingt)\
**Post date:** [November 26, 2026, 3:45pm UTC](https://dev.lucee.org/t/default-locale/17946/2 "2026-11-26T15:45:35Z")

</div>

Thanks for the report. To help track this down, could you share the Lucee version where you noticed the change, whether locale is set in .CFConfig.json or Application.cfc (and to what), and a short example of the LSDateFormat/DateFormat call plus the unexpected output?

---

<div class="post-metadata">

**Author:** ![thefalken](https://dev.lucee.org/user_avatar/dev.lucee.org/thefalken/32/57_2.png) [@thefalken](https://dev.lucee.org/u/thefalken)\
**Post date:** [November 26, 2026, 3:48pm UTC](https://dev.lucee.org/t/default-locale/17946/3 "2026-11-26T15:48:20Z")

</div>

Sorry if I wasn’t clear, I’m not setting locale at all. getLocale() (Dockerised v6.x) is returning `english (us)` and I want to understand why.

```auto
writedump(getLocale())

f='dd/mmm/yyyy H:nn'
str='02/01/2026 03:04'
writeDump(str)
writedump(isDate(str))
writedump(dateTimeFormat(str,f))

writedump(lsdateTimeFormat(str,f,'en-gb'))
writedump(setLocale('english (united kingdom)'))
writedump(getLocale())
writedump(lsdateTimeFormat(str,f,'en-gb'))
writedump(lsdateTimeFormat(str,f,'english (united kingdom)'))
writedump(lsdateTimeFormat(parseDateTime(str),f,'en-gb'))
writedump(lsdateTimeFormat(lsparseDateTime(str),f,'english (united kingdom)'))

```

This outputs the below, and I _think_ it didn’t use to require the lsparsedatetime, as if the default locale was UK English, or at least UTC. But I’m having a hard time working back through both our past releases, and past Lucee releases to find any change, if there is one !

```auto
string	english (us)
string	02/01/2026 03:04
boolean	true
string	01/Feb/2026 3:04
string	01/Feb/2026 3:04
Locale english (us)
Code (ISO-3166)	en_US
Country	United States
Language	English
string	english (uk)
string	01/Feb/2026 3:04
string	01/Feb/2026 3:04
string	01/Feb/2026 3:04
string	02/Jan/2026 3:04

```

---

<div class="post-metadata">

**Author:** ![thefalken](https://dev.lucee.org/user_avatar/dev.lucee.org/thefalken/32/57_2.png) [@thefalken](https://dev.lucee.org/u/thefalken)\
**Post date:** [November 26, 2026, 4:00pm UTC](https://dev.lucee.org/t/default-locale/17946/4 "2026-11-26T16:00:25Z")

</div>

And, as a more concise test

```auto
writedump(getLocale())
writedump(setLocale('english (united kingdom)'))
writedump(getLocale())

f='dd/mmm/yyyy H:nn'
str='02/01/2026 03:04'
writeDump(str)
writedump(isDate(str))
writedump(dateTimeFormat(str,f))
writedump(lsdateTimeFormat(str,f))

```

This should set the locale to UK, then print a date in January, but both dates print as being in Feb

```auto
string	english (us)
Locale english (us)
Code (ISO-3166)	en_US
Country	United States
Language	English
string	english (uk)
string	02/01/2026 03:04
boolean	true
string	01/Feb/2026 3:04
string	01/Feb/2026 3:04

```

dateTimeFormat() seems to be parsing the string according to US conventions ?  
It’s docs (currently) say it “formats according to US”, and doesn’t say anything about it’s parsing of strings.

---

<div class="post-metadata">

**Author:** ![micstriit](https://dev.lucee.org/user_avatar/dev.lucee.org/micstriit/32/26_2.png) [@micstriit](https://dev.lucee.org/u/micstriit)\
**Post date:** [November 26, 2026, 5:45pm UTC](https://dev.lucee.org/t/default-locale/17946/5 "2026-11-26T17:45:59Z")

</div>

The formatting isn’t the problem here, the parsing of the string is. When you pass a string to a formatting function like `dateTimeFormat()` or `lsDateTimeFormat()`, the function first has to turn it into a date. The default conversion always reads a pattern like `02/01/2026` US style, month first, whatever locale is set. Every past Lucee and Railo version behaves this way, and so does ACF, so this isn’t something we can change.

The fix is to parse strings like this explicitly with the locale-aware function, and only then format the result:

```auto
str = "02/01/2026 03:04";
d = lsParseDateTime(str, "en_GB"); // or set the locale and call lsParseDateTime(str)
writeOutput(dateTimeFormat(d, "dd/mmm/yyyy H:nn")); // 02/Jan/2026 3:04

```

That said, I’ve been thinking for a while that Lucee should let you choose which parser is used by default for these implicit conversions: the simple one used today, or one that respects the locale. Then a string passed to `dateTimeFormat()` would be read the way your locale expects. That would be a new opt-in setting, so the current behaviour stays the default.

On your original question: when no locale is set in .CFConfig.json or Application.cfc, Lucee uses the JVM’s default locale. In a Docker container that’s usually `en_US`. You can change it with `this.locale = "en_GB";` in Application.cfc, with `"locale": "en_GB"` in .CFConfig.json, or on the JVM with `-Duser.language=en -Duser.country=GB`.

---

<div class="post-metadata">

**Author:** ![GianTschingt](https://dev.lucee.org/user_avatar/dev.lucee.org/giantschingt/32/9300_2.png) [@GianTschingt](https://dev.lucee.org/u/GianTschingt)\
**Post date:** [November 26, 2026, 5:50pm UTC](https://dev.lucee.org/t/default-locale/17946/6 "2026-11-26T17:50:12Z")

</div>

Michael asked me to create a ticket for the default date parser setting he suggested above, so here it is: [LDEV-7006](https://luceeserver.atlassian.net/browse/LDEV-7006)

It covers an opt-in setting to choose between the simple default parser and a locale-aware one, with the current behaviour staying the default.
