How to use new datetime localization feature?

I’ve been trying to use the new localized date and time feature, but it doesn’t seem to work easily. I’ve tried to set languages in config.toml file and it doesn’t seem to get the information from there.

I’m using this docker-compose file to start the dev server and it doesn’t work either.

server:
    image: klakegg/hugo:0.91.2-ext-alpine
    command: server
    environment:
      - LC_TIME=pt-BR.UTF-8
      - LANG=pt-BR.UTF-8
    volumes:
      - ./:/src
    ports:
      - "1313:1313"

Where should I set the correct language configuration so I can use something like this?

{{ .Date | time.Format ":date_medium" }}

Use the timeZone setting in the project’s config, see:

This topic was automatically closed after 4 days. New replies are no longer allowed.