This hit me and I tracked it down, and created this account to answer. It has to do with the sed in entrypoint.sh in the container. It uses _ as a separator:
sed -i -E "s_^TZ=.*_TZ=\"${TZ}\"_" "/opt/omd/sites/$CMK_SITE_ID/etc/environment"
and it breaks if you have a _ in your timezone, like America/New_York or America/Los_Angeles and probably others.
I was using Los_Angeles and switched to PST8PDT (had to edit that environment file manually) and that fixed it.
That would explain why it happens across versions for some people, and never for others, and only in the container release.
Just logging in to say thank you @marmoset for debugging this! Testing out checkmk and ended up here after the first container restart.
I was able to reproduce this bug as of container version checkmk/check-mk-raw:2.4.0-2025.11.20. The fix was to change the container environment variables to pass TZ=America/PST8PDT instead of TZ=America/Los_Angeles, like you said.
@aa777888 — regarding Apache not starting after the TZ change: US/Eastern is a legacy alias in the IANA timezone database that links to America/New_York (see IANA tz Theory file). These aliases can behave unexpectedly in container environments. Try EST5EDT instead. To debug the Apache issue, exec into your container and check with omd status which component is failing. If only Apache is affected, see also this related thread as you know and the Checkmk KB article on Apache troubleshooting.
relevant sections are “Names of time zone rules”, ~ Line 126–138 :
Older versions of this package used a different naming scheme, and these older names are still supported. See the file ‘backward’ for most of these older names (e.g., ‘US/Eastern’ instead of ‘America/New_York’).
and directly after:
Older versions of this package defined legacy names that are incompatible with the first rule of location names, but which are still supported. These legacy names are mostly defined in the file ‘etcetera’. Also, the file ‘backward’ defines the legacy names ‘GMT0’, ‘GMT-0’, ‘GMT+0’ and ‘Canada/East-Saskatchewan’, and the file ‘northamerica’ defines the legacy names ‘EST5EDT’, ‘CST6CDT’, ‘MST7MDT’, and ‘PST8PDT’.