Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

ai / ai-workflow

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • ai-workflow
  • workspace
  • agent-admin
  • backend
  • app
  • infrastructure
  • time.py
  • imwangxiaozhou's avatar
    refactor: 统一项目时区处理,调整官网agent默认展示状态并优化日志配置 · 72a7a6ec ...
    - 新增 `app/infrastructure/time.py` 封装中国时区当前时间工具函数,替换全项目手动处理UTC时区的代码
    - 新增数据库迁移脚本将 `official_site_agent_display` 表的 `display_status` 默认值设为 `disable`
    - 更新对应模型、Schema、业务服务的默认展示状态配置
    - 调整第三方库日志级别至WARNING,减少apscheduler、httpx等库的冗余日志输出
    - 优化企业微信同步模块的日志格式和消息过滤逻辑,统一时区处理
    imwangxiaozhou committed May 27, 2026
    72a7a6ec
time.py 193 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9
from __future__ import annotations

from datetime import datetime, timedelta, timezone

CHINA_TZ = timezone(timedelta(hours=8))


def china_now() -> datetime:
    return datetime.now(CHINA_TZ)