加入时间戳修正配置
This commit is contained in:
@@ -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()
|
||||
|
@@ -6,3 +6,5 @@ time_override = -1
|
||||
quick_pass = 0
|
||||
# 对于每个项目的新记忆核子数量
|
||||
tasked_number = 6
|
||||
# UTC 时间戳修正 用于 UNIX 日时间戳的生成修正, 单位为秒
|
||||
timezone_offset = +28800 # 中国标准时间 (UTC+8)
|
2
main.py
2
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,
|
||||
|
@@ -1,2 +1,2 @@
|
||||
ver = "0.3.5"
|
||||
stage = "late"
|
||||
ver = "0.3.6"
|
||||
stage = "prototype"
|
@@ -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"),
|
||||
|
Reference in New Issue
Block a user