You set TZ=Europe/Amsterdam on a container and the logs still show UTC. The variable is fine; the image is missing the timezone database that tells it what Amsterdam means.
docker run --rm -e TZ=Europe/Amsterdam alpine date
docker run --rm -e TZ=Europe/Amsterdam php:8.3-cli date
The plain Alpine image prints UTC, because it ships without the tzdata package. The Debian based PHP image has it and prints the local time. Small images often leave it out to save space.
Two fixes. If you build the image yourself, add the package, for example apk add tzdata on Alpine. If you do not, mount the host’s local time file read-only:
docker run --rm -v /etc/localtime:/etc/localtime:ro alpine date
That gives the container the host’s current zone, without any database inside.
I would set both TZ and the mount in Compose files; between them, almost every image gets it right. The mount copies only the current rules, so TZ stays useful for apps that read the variable directly. Some apps ignore the system clock entirely and have their own timezone setting, often in their web UI, so check there too before you blame the container.
Further reading: Alpine Linux wiki: setting the timezone, docker container run