Skip to content

time: Docker image passes the literal ${LOCAL_TIMEZONE} to --local-timezone #5182

Open

Description

@cliffhall

Problem

The mcp/time Docker image passes the literal string ${LOCAL_TIMEZONE} to the server as its --local-timezone argument. src/time/Dockerfile ends with an exec-form entrypoint:

ENV LOCAL_TIMEZONE=${LOCAL_TIMEZONE:-"UTC"}
ENTRYPOINT ["mcp-server-time", "--local-timezone", "${LOCAL_TIMEZONE}"]

Docker performs no variable substitution in the exec (JSON array) form of ENTRYPOINT, so the process receives ${LOCAL_TIMEZONE} verbatim rather than UTC or the value set with docker run -e LOCAL_TIMEZONE=…. The ENV line's shell-style default is also only expanded against build-time values, not a runtime -e.

Expected

The container uses LOCAL_TIMEZONE from the environment at run time, defaulting to UTC when unset.

Notes

Found by static reading of the Dockerfile during the backlog triage (#4876); nothing in CI builds the Docker images (see #4782), which is how it went unnoticed. A fix would read the variable at run time, for example a shell-form entrypoint or having the server fall back to the LOCAL_TIMEZONE environment variable.

Activity

  1. added
    bugSomething isn't working
    server-timeReference implementation for the Time MCP server - src/time
    on Oct 19, 2026
  2. cliffhall commented on Oct 19, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Medium (total 7)

    • Severity 3: the Docker image hands the server an unexpanded ${LOCAL_TIMEZONE}, so the timezone option is unusable in the container; running the package directly is the workaround
    • Urgency 3: affects the published image now, but nothing else waits on it
    • Bonuses: +1 bug label

    Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.

  3. cliffhall commented on Oct 20, 2026

    @cliffhall
    MemberAuthor

    Prior work, from the PR backlog triage (#4877). These outside pull requests addressed this issue against the pre-refactor code:

    They are being closed as part of the backlog triage in #4875, since the repository now takes issues rather than outside PRs and their diffs predate the v2 refactor. They stay readable and serve as prototypes for the fix here. Thank you to their authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver-timeReference implementation for the Time MCP server - src/timev2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions