TimeZoneInfo and Alpine
Monday, February 2, 2026
I was helping a co-worker fixing a TimeZoneNotFoundException error. The error was actually on TimeZoneInfo.FindSystemTimeZoneById(). Per my experience, it was based on timezone installed in the machine. I was told that using Windows or Linux Id both throw an exception.
I found out that the application Docker base image is based on Alpine Linux. A quick search reveals that Alpine Linux doesn't have tzdata package installed.
Added the following line in the Dockerfile fixed the error.
RUN apk add --no-cache tzdata