hermes - 💡(How to fix) Fix feat: 支持用户自定义时区设置 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16610Fetched 2026-04-28 06:52:15
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Code Example

timezone: Asia/Shanghai  # 或通过 TIMEZONE=Asia/Shanghai 环境变量
RAW_BUFFERClick to expand / collapse

功能请求:用户自定义时区设置

问题描述

当前 Hermes Agent 使用固定 UTC 时区,不支持用户修改。这导致以下问题:

  • 日志时间、计划任务(cron)触发时间显示为 UTC,与用户本地时间不一致
  • 定时任务按 UTC 执行,而非用户预期的本地时间
  • 用户无法在配置中指定自己所在的时区

期望行为

用户应能够:

  1. 在配置文件中自由设置时区(如 Asia/ShanghaiAmerica/New_York
  2. 支持标准 IANA 时区格式(而非 UTC 偏移量)
  3. 配置修改后自动生效,无需重启服务
  4. 保持向后兼容:不设置时区时默认行为与当前一致

建议实现方式

config.yaml 或环境变量中添加时区配置项:

timezone: Asia/Shanghai  # 或通过 TIMEZONE=Asia/Shanghai 环境变量

或在启动脚本中支持 --timezone 参数。

使用场景

  • 中国用户(UTC+8)希望日志和 cron 任务显示/执行时间为本地时间
  • 多时区团队成员共享同一部署实例时,各自需要不同的时间显示
  • 调试时需要切换时区验证任务调度逻辑

此 issue 由 Hermes Agent 代用户提交

extent analysis

TL;DR

To support user-customizable time zones, add a timezone configuration option to config.yaml or as an environment variable, allowing users to specify their local time zone.

Guidance

  • Add a timezone field to the config.yaml file, allowing users to specify their desired time zone in IANA format (e.g., Asia/Shanghai).
  • Consider adding support for a --timezone command-line parameter to the startup script for alternative configuration.
  • Ensure that the configuration change takes effect without requiring a service restart.
  • Verify that the default behavior remains unchanged when no time zone is specified, maintaining backward compatibility.

Example

timezone: Asia/Shanghai

or

TIMEZONE=Asia/Shanghai

Notes

The implementation should handle standard IANA time zone formats and ensure seamless integration with existing logging and cron job scheduling mechanisms.

Recommendation

Apply workaround by adding the timezone configuration option to support user-customizable time zones, as this provides the necessary flexibility for users across different regions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat: 支持用户自定义时区设置 [1 participants]