Invalid timeZone for language "en"

I’m trying to use the extended linux client (version 0.92), but I keep getting this error:

+ tar xvfz hugo_extended_0.92.0_Linux-64bit.tar.gz hugo
hugo
+ ./hugo --destination public --baseURL https://drechsel.xyz/
Total in 2 ms
Error: invalid timeZone for language "en": unknown time zone Europe/Berlin

Using the windows client with the same version works fine though.

Is there something I’m doing wrong?

In my config.toml:

languageCode = 'en-us'
timeZone = 'Europe/Berlin'

The doc mentions that:

The list of valid values may be system dependent

What version of Linux are you using?
Perhaps other Linux users may know more.

I’m using Alpine Linux for this (inside a container).

I found what was causing the issue.

Since alpine linux has no tzdata preinstalled, the hugo client couldn’t translate the timezone data in config.toml.
After the installation of the tzdata package hugo was able to build the site.

apk update
apk add tzdata

@alexandros thanks for giving me the hint :slight_smile:

1 Like

UTC+n and UTC-n where n is 0 to 12 should work in all cases if you can’t add packages to your system. I know that does not much help in cases where the country still has a working summertime difference, but for the rest of the world, it should. I only use UTC+7 instead of Asia/Bangkok - this too makes it easier to read the actual time if anyone ever has to look this up manually and it’s more portable.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.