diff --git a/app/Dockerfile b/app/Dockerfile index f7a19b5..b9c805c 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,5 +1,7 @@ FROM node:20-slim +ENV TZ=Asia/Shanghai + # 常用命令行工具:Agent 的 terminal 工具经常用到 RUN apt-get update -y && apt-get install -y --no-install-recommends \ ca-certificates curl git python3 python3-pip python3-venv python3-dev \ diff --git a/app/server/engine.js b/app/server/engine.js index 990b3cf..0cf3f7c 100644 --- a/app/server/engine.js +++ b/app/server/engine.js @@ -415,7 +415,7 @@ function sleep(ms) { return new Promise(r => setTimeout(r, ms)); } function sessionContextContent(session) { const d = new Date(); const pad = n => String(n).padStart(2, '0'); - const dateStr = d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()); + const dateStr = d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()); const model = session.model_id ? modelDisplayName(session.model_id) : '尚未绑定(排队中,绑定后自动开始处理)'; @@ -426,7 +426,7 @@ function sessionContextContent(session) { : '未知'; return [ '【会话上下文】由系统自动注入,无需回复本消息', - '- 当前日期:' + dateStr + '(UTC)', + '- 当前日期:' + dateStr, '- 任务目录:' + taskDirOf(session.id), '- 当前模型:' + model, '- 图片(vision):' + visionLine,