From 9dada59c560a6eec732f5fd22d4edba42c2dd293 Mon Sep 17 00:00:00 2001 From: david-ajax Date: Mon, 29 Sep 2025 23:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=97=B6=E9=97=B4=E6=88=B3?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auxiliary.py | 2 +- config.toml | 2 ++ main.py | 2 +- metadata.py | 4 ++-- screens.py | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/auxiliary.py b/auxiliary.py index ed31ff3..a8fca8f 100644 --- a/auxiliary.py +++ b/auxiliary.py @@ -61,7 +61,7 @@ def get_daystamp() -> int: if time_override != -1: return int(time_override) - return int(time.time() // (24 * 3600)) + return int((time.time()+config.get("timezone_offset")) // (24 * 3600)) def get_md5(text): return hashlib.md5(text.encode('utf-8')).hexdigest() diff --git a/config.toml b/config.toml index 04232bd..f3ce71f 100644 --- a/config.toml +++ b/config.toml @@ -6,3 +6,5 @@ time_override = -1 quick_pass = 0 # 对于每个项目的新记忆核子数量 tasked_number = 6 +# UTC 时间戳修正 用于 UNIX 日时间戳的生成修正, 单位为秒 +timezone_offset = +28800 # 中国标准时间 (UTC+8) \ No newline at end of file diff --git a/main.py b/main.py index 2b86495..0c5963e 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ import os class AppLauncher(App): CSS_PATH = "styles.css" - TITLE = "潜进 - 辅助记忆程序" + TITLE = "潜进 - 辅助记忆调度器" BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")] SCREENS = { "dashboard": screens.DashboardScreen, diff --git a/metadata.py b/metadata.py index a0923f3..38cf801 100644 --- a/metadata.py +++ b/metadata.py @@ -1,2 +1,2 @@ -ver = "0.3.5" -stage = "late" \ No newline at end of file +ver = "0.3.6" +stage = "prototype" \ No newline at end of file diff --git a/screens.py b/screens.py index 681cd51..9f83a96 100644 --- a/screens.py +++ b/screens.py @@ -197,6 +197,7 @@ class DashboardScreen(Screen): yield Container( Label(f'欢迎使用 "潜进" 启发式辅助记忆调度器, 版本 {metadata.ver}', classes="title-label"), Label(f"当前的 UNIX 日时间戳: {aux.get_daystamp()}"), + Label(f'包含时间戳修正: UTC+{config.get("timezone_offset")/3600}'), Label("选择待学习的记忆单元:", classes="title-label"), ListView(id="file-list", classes="file-list-view"), Label(f"\"潜进\" 开放源代码软件项目 | 版本 {metadata.ver} {metadata.stage.capitalize()} | Wang Zhiyu 2025"),