feat: 新增时区配置功能、支持UTC时间自动转换为本地时区及环境变量配置

This commit is contained in:
TheSmallHanCat
2026-01-24 13:35:38 +08:00
parent 5342435512
commit ef1d1f90de
6 changed files with 119 additions and 2 deletions

View File

@@ -1,5 +1,11 @@
FROM python:3.11-slim
# Set timezone to Asia/Shanghai (UTC+8) by default
# Can be overridden with -e TZ=<timezone> when running container
ENV TZ=Asia/Shanghai \
TIMEZONE_OFFSET=8
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
COPY requirements.txt .