Docker Community Forums

Share and learn in the Docker community.

Command [docker logs - t]

The timestamp displayed by the command [docker logs - t] is not the time zone of the system,how to change it?
Timestamps are always displayed as UTC time zone, not system time zone

It depends on the timezone in the container, try starting it with:


ex. Europe/Copenhagen

list: List of tz database time zones - Wikipedia

The timezone in the container is the same as the system time zone,my nginx-log in the container shows the right timezone,but the command [docker logs -t] shows not right

Oh sorry, misunderstood.
No, you cant change that at the moment.

Someone posted a workaround in: Proposal: Support time zone for `docker-logs` · Issue #604 · docker/cli · GitHub

Thanks for the answer. Now I know the reason, just as what I guess.