Skip to content

Commit 40a15b4

Browse files
authored
Merge pull request #640 from S1M0N38/feat-configurable-timezone
feat: configurable timezone for docker in `time` server
2 parents ea1b0f5 + 8c1ed8c commit 40a15b4

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/time/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ COPY --from=uv --chown=app:app /app/.venv /app/.venv
3232
# Place executables in the environment at the front of the path
3333
ENV PATH="/app/.venv/bin:$PATH"
3434

35-
# when running the container, add --db-path and a bind mount to the host's db file
36-
ENTRYPOINT ["mcp-server-time"]
35+
# Set the LOCAL_TIMEZONE environment variable
36+
ENV LOCAL_TIMEZONE=${LOCAL_TIMEZONE:-"UTC"}
37+
38+
# when running the container, add --local-timezone and a bind mount to the host's db file
39+
ENTRYPOINT ["mcp-server-time", "--local-timezone", "${LOCAL_TIMEZONE}"]

src/time/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Add to your Claude settings:
6464
"mcpServers": {
6565
"time": {
6666
"command": "docker",
67-
"args": ["run", "-i", "--rm", "mcp/time"]
67+
"args": ["run", "-i", "--rm", "-e", "LOCAL_TIMEZONE", "mcp/time"]
6868
}
6969
}
7070
}

0 commit comments

Comments
 (0)