2

The date field is displaying dates in US format (mm/dd/yyyy) but I need the UK (dd/mm/yyyy) format. According to the docs:

Dates and times are both formatted for the user’s preferred locale. They are displayed in the site’s timezone, however they get stored in UTC like all other dates in Craft.

How does one set this? The timezone is set correctly in the site config.

  • What locales do have you showing under Settings > Locales? – Steve Abraham Nov 18 '14 at 10:50
3

Dates and times are both formatted for the user’s preferred locale.

You have to select your "preferred locale" when installing Craft. If you chose the wrong one you (currently) can't undo it from the CP, but have to change it directly in the database (--> "craft_locales" table).

Another way would be to install a second locale (even if you don't need it at all). Because if your Craft site is multilingual you can switch between installed locales from the user settings in the CP though.

CP user settings - preferred locale

| improve this answer | |
  • Thanks for answering. Currently, the 'preferredLocale' for both users is 'NULL'. Checked another Craft site I built and it's the same. – hamishtaplin Nov 18 '14 at 11:03
  • Sorry @hamish, corrected my answer. – carlcs Nov 18 '14 at 11:06
  • If you have more than one system locale installed you can then select it for each user. This can all be done via CP, see: glui.me/?i=a9q5btaremqgrl1/2014-11-18_at_11.06_(1).png and glui.me/?i=8y8kfmwwcd7vovr/2014-11-18_at_11.06.png – Steve Abraham Nov 18 '14 at 11:07
  • Whatever you do do not delete the original locale, and choose to assign the entries to the new locale. I just did this, and half the website content disappeared. Has to restore from backup. – Laurence Cope Jul 15 '16 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.