feat(tz): 默认时区改为中国(Asia/Shanghai,不依赖容器 TZ) - #23
Merged
Merged
Conversation
miku-hermes
commented
Aug 7, 2026
Contributor
- 新增 src/timezone.js:utcOffsetHours/tzModifier/formatLocalTime 统一工具
- config.timezone 默认 'Asia/Shanghai',可用 MIOTIFY_TZ 环境变量覆盖
- stats.js/logs.js:改用 tzModifier(),统计口径固定中国时区
- 4 个通知插件 formatLocalTime 强制 timeZone: 'Asia/Shanghai'
added 2 commits
August 7, 2026 14:01
- 新增 src/timezone.js:utcOffsetHours/tzModifier/formatLocalTime 统一工具 - config.timezone 默认 'Asia/Shanghai',可用 MIOTIFY_TZ 环境变量覆盖 - stats.js/logs.js:改用 tzModifier(),统计口径固定中国时区 - 4 个通知插件 formatLocalTime 强制 timeZone: 'Asia/Shanghai'
去掉硬编码 timeZone: 'Asia/Shanghai',改为读取 process.env.MIOTIFY_TZ, 未配置时默认中国时区(Asia/Shanghai)——默认而非强制。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.