[BUGFIX] Set up locales before resolving field values

Locales were not set up when the object is rendered for indexing, thus leading to incorrect results when using functions like strftime()

Resolves: #55926
Releases: 3.0