当前位置:首页>python>一个基于 Python + Tkinter 的桌面时间工具时刻日期查看器

一个基于 Python + Tkinter 的桌面时间工具时刻日期查看器

  • 2026-08-19 14:17:10
一个基于 Python + Tkinter 的桌面时间工具时刻日期查看器

⏰ 时刻日期查看器

一个基于 Python + Tkinter 的桌面时间工具,集成实时时钟、月历、时间戳转换、倒计时、日期差计算和世界时钟,浅色主题设计,零外部依赖开箱即用。

📸 项目概述

  • 文件datetime_viewer.py
  • 框架: Tkinter(Python 内置)
  • 主题: 浅色清新风格
  • 依赖: 无(农历为可选依赖)

🚀 快速开始

环境要求

  • Python 3.8+
  • 无需安装任何第三方库即可运行

运行

python datetime_viewer.py

可选:启用农历显示

pip install lunarcalendar

安装后程序自动在时钟区域显示农历日期。

📋 功能模块

1. ⏰ 实时时钟(顶部区域)

显示内容
示例
时间(大字体)
14:30:25
公历日期
2026年07月29日 星期三
农历日期
农历六月十五(需 lunarcalendar)
年度进度
第210天 | 第30周 | 距年末155天
当前时间戳
秒: 1785542425 | 毫秒: 1785542425000

每秒自动刷新,窗口置顶按钮可让工具常驻桌面。

2. 📅 月历面板(左侧)

功能
说明
当月日历
周一到周日网格布局
今天高亮
蓝色圆形背景标记
周末标红
周六日用玫红色显示
月份切换
◀ ▶ 按钮切换上下月
回到今天
「今天」按钮快速定位

3. ⏱ 时间戳工具(Tab 1)

功能
说明
实时时间戳
显示当前秒级 + 毫秒级时间戳
一键复制
复制当前时间戳到剪贴板
时间戳→日期
输入时间戳转为可读日期(支持秒/毫秒自动识别)
日期→时间戳
输入日期时间转为时间戳

输入格式:

  • 时间戳:1785542425(秒)或 1785542425000(毫秒)
  • 日期:2026-07-29 14:30:25

4. ⏳ 倒计时(Tab 2)

功能
说明
自定义倒计时
输入目标日期,显示剩余天/时/分
已过天数
如果目标日期已过,显示过去了多少天
下班倒计时
距今天 18:00 还有多久
周末倒计时
距本周六还有多久
元旦倒计时
距明年 1 月 1 日

输入格式:2026-12-31

5. 📅 日期差计算(Tab 3)

功能
说明
两日期相差
计算天数、周数、约几个月
快捷查询
30/90/180/365 天后是哪天

输入格式:2026-07-29

6. 🌍 世界时钟(底部)

同时显示 6 个城市的当前时间:

城市
时区
与北京时差
北京
UTC+8
本地
东京
UTC+9
+1h
伦敦
UTC+0
-8h
纽约
UTC-4
-12h
洛杉矶
UTC-7
-15h
悉尼
UTC+10
+2h

每秒自动更新。

🏗️ 界面布局

┌──────────────────────────────────────────────────┐│  14:30:25          2026年07月29日 星期三  📌置顶  ││                    农历 六月十五                   ││                    第210天 | 第30周 | 距年末155天   ││  秒: 1785542425 | 毫秒: 1785542425000            │├──────────────────────────────────────────────────┤│           │                                      ││  ◀ 2026年7月 ▶ [今天]│  [⏱时间戳] [⏳倒计时] [📅日期差]││                      │                           ││  一  二  三  四  五  六  日│  当前时间戳             ││  ..  ..   1   2   3   4   5│  1785542425  [复制]    ││   6   7   8   9  10  11  12│                       ││  13  14  15  16  17  18  19│  时间戳 → 日期          ││  20  21  22  23  24  25  26│  [输入框] [转换]        ││  27  28 [29] 30  31        │                       ││                      │  日期 → 时间戳              ││           │  [输入框] [转换]                       │├──────────────────────────────────────────────────┤│  🌍 世界时钟                                      ││  北京     东京     伦敦     纽约     洛杉矶   悉尼  ││  14:30   15:30   06:30   02:30   23:30   16:30   ││  本地    UTC+9   UTC+0   UTC-4   UTC-7   UTC+10  │└──────────────────────────────────────────────────┘

🎨 配色方案

采用清新浅色主题:

用途
颜色
色值
主背景
极浅灰蓝
#f8fafc
卡片背景
纯白
#ffffff
卡片边框
淡灰
#e2e8f0
主文字
深蓝黑
#1e293b
次要文字
灰蓝
#64748b
弱化文字
浅灰
#94a3b8
强调色
明亮蓝
#3b82f6
成功色
翠绿
#10b981
错误色
红色
#ef4444
周末/高亮
玫红
#e11d48
今天背景
蓝色
#3b82f6
按钮背景
极浅蓝
#eff6ff
输入框
浅灰
#f1f5f9

📦 依赖说明

依赖
必需
用途
tkinter
✅ 内置
GUI 界面
calendar
✅ 内置
月历生成
datetime
✅ 内置
日期时间处理
lunarcalendar
❌ 可选
农历日期显示

⚠️ 注意事项

时区说明

世界时钟使用固定 UTC 偏移量,未处理夏令时。实际使用中:

  • 伦敦夏令时为 UTC+1(3月~10月)
  • 纽约夏令时为 UTC-4(3月~11月)
  • 如需精确时区,可安装 pytz 扩展

农历显示

  • 未安装 lunarcalendar 时会显示提示文字,不影响其他功能
  • 安装命令:pip install lunarcalendar

时间戳识别

  • 输入 10 位数字 → 按秒级时间戳处理
  • 输入 13 位数字 → 按毫秒级时间戳处理(自动除以 1000)

🔧 自定义修改

修改世界时钟城市

self.world_zones = [    ("北京"8), ("东京"9), ("伦敦"0),    ("纽约"-4), ("洛杉矶"-7), ("悉尼"10),# 添加更多城市    ("柏林"2), ("迪拜"4), ("新加坡"8),]

修改倒计时目标

在 _refresh_common_countdowns 方法中添加:

targets = [    ("今天下班 (18:00)", datetime(now.year, now.month, now.day, 1800)),    ("本周末", now + timedelta(days=(5 - now.weekday()) % 7)),    ("元旦", datetime(now.year + 111)),# 添加自定义    ("春节", datetime(202726)),    ("国庆", datetime(now.year, 101)),]

修改时钟字体大小

F_CLOCK = ("Segoe UI"42"bold")  # 改为你喜欢的大小

打包为 exe

pip install pyinstallerpyinstaller --onefile --windowed --name "DateTimeViewer" datetime_viewer.py

📄

# -*- coding: utf-8 -*-"""时刻日期查看器 - 浅色主题 GUI功能:实时时钟、月历、时间戳工具、倒计时、世界时钟、日期差计算依赖:tkinter(内置)可选:pip install lunarcalendar"""import tkinter as tkfrom tkinter import ttk, messageboximport calendarimport timefrom datetime import datetime, timedelta, timezone# ══════ 浅色主题配色 ══════BG = "#f8fafc"CARD = "#ffffff"BORDER = "#e2e8f0"TEXT = "#1e293b"TEXT_SEC = "#64748b"TEXT_WEAK = "#94a3b8"ACCENT = "#3b82f6"GREEN = "#10b981"YELLOW = "#f59e0b"RED = "#ef4444"PINK = "#e11d48"BTN_BG = "#eff6ff"BTN_FG = "#1d4ed8"INPUT_BG = "#f1f5f9"TODAY_BG = "#3b82f6"TODAY_FG = "#ffffff"SELECT_BG = "#dbeafe"F_CLOCK = ("Segoe UI"42"bold")F_DATE = ("Microsoft YaHei"13)F_TITLE = ("Microsoft YaHei"11"bold")F_BODY = ("Microsoft YaHei"10)F_SMALL = ("Microsoft YaHei"9)F_MONO = ("Consolas"11)F_CAL = ("Microsoft YaHei"10)F_CAL_HEAD = ("Microsoft YaHei"9"bold")classDateTimeViewer:def__init__(self):        self.root = tk.Tk()        self.root.title("时刻日期查看器")        sw = self.root.winfo_screenwidth()        sh = self.root.winfo_screenheight()        w, h = min(sw - 80960), min(sh - 80680)        self.root.geometry(f"{w}x{h}+{(sw-w)//2}+{(sh-h)//2}")        self.root.configure(bg=BG)        self.root.resizable(TrueTrue)        self.cal_year = datetime.now().year        self.cal_month = datetime.now().month        self.topmost = False        self._build_ui()        self._update_clock()def_card(self, parent, **kwargs):"""创建卡片容器"""        f = tk.Frame(parent, bg=CARD, bd=1, relief="solid",                     highlightbackground=BORDER, highlightthickness=1, **kwargs)return fdef_build_ui(self):# 顶部时钟区        self._build_clock()# 中部主区域        mid = tk.Frame(self.root, bg=BG)        mid.pack(fill="both", expand=True, padx=16, pady=(08))# 左侧日历        self._build_calendar(mid)# 右侧工具区        self._build_tools(mid)# 底部世界时钟        self._build_world_clock()# ══════ 顶部时钟 ══════def_build_clock(self):        clock_card = self._card(self.root)        clock_card.pack(fill="x", padx=16, pady=(128))        top_row = tk.Frame(clock_card, bg=CARD)        top_row.pack(fill="x", padx=16, pady=(124))# 时钟大字        self.lbl_time = tk.Label(top_row, text="00:00:00", font=F_CLOCK,                                 bg=CARD, fg=TEXT)        self.lbl_time.pack(side="left")# 右侧信息        info_frame = tk.Frame(top_row, bg=CARD)        info_frame.pack(side="right", anchor="e")        self.lbl_date = tk.Label(info_frame, text="", font=F_DATE, bg=CARD, fg=TEXT)        self.lbl_date.pack(anchor="e")        self.lbl_lunar = tk.Label(info_frame, text="", font=F_BODY, bg=CARD, fg=TEXT_SEC)        self.lbl_lunar.pack(anchor="e")        self.lbl_year_info = tk.Label(info_frame, text="", font=F_SMALL, bg=CARD, fg=TEXT_WEAK)        self.lbl_year_info.pack(anchor="e")# 置顶按钮        self.pin_btn = tk.Button(top_row, text="📌 置顶", font=F_SMALL, bg=BTN_BG,                                 fg=BTN_FG, relief="flat", padx=8, command=self._toggle_topmost)        self.pin_btn.pack(side="right", padx=(012))# ══════ 月历面板 ══════def_build_calendar(self, parent):        left = self._card(parent)        left.pack(side="left", fill="both", padx=(06), pady=0, expand=False)# 月份导航        nav = tk.Frame(left, bg=CARD)        nav.pack(fill="x", padx=12, pady=(104))        tk.Button(nav, text="◀", font=F_BODY, bg=BTN_BG, fg=BTN_FG, relief="flat",                  width=3, command=self._prev_month).pack(side="left")        self.lbl_month = tk.Label(nav, text="", font=F_TITLE, bg=CARD, fg=TEXT)        self.lbl_month.pack(side="left", expand=True)        tk.Button(nav, text="▶", font=F_BODY, bg=BTN_BG, fg=BTN_FG, relief="flat",                  width=3, command=self._next_month).pack(side="left")        tk.Button(nav, text="今天", font=F_SMALL, bg=ACCENT, fg="#ffffff", relief="flat",                  padx=8, command=self._goto_today).pack(side="left", padx=(80))# 星期头        week_frame = tk.Frame(left, bg=CARD)        week_frame.pack(fill="x", padx=12, pady=(40))        weekdays = ["一""二""三""四""五""六""日"]for i, d in enumerate(weekdays):            color = PINK if i >= 5else TEXT_SEC            tk.Label(week_frame, text=d, font=F_CAL_HEAD, bg=CARD, fg=color,                     width=4).grid(row=0, column=i, pady=2)# 日期格子        self.cal_frame = tk.Frame(left, bg=CARD)        self.cal_frame.pack(fill="both", expand=True, padx=12, pady=(010))        self.cal_labels = []for r in range(6):            row = []for c in range(7):                lbl = tk.Label(self.cal_frame, text="", font=F_CAL, bg=CARD,                               fg=TEXT, width=4, height=1)                lbl.grid(row=r, column=c, pady=1, padx=1)                row.append(lbl)            self.cal_labels.append(row)        self._refresh_calendar()def_refresh_calendar(self):        self.lbl_month.configure(text=f"{self.cal_year}年 {self.cal_month}月")        today = datetime.now()        cal = calendar.Calendar(firstweekday=0)        days = cal.monthdayscalendar(self.cal_year, self.cal_month)for r in range(6):for c in range(7):                lbl = self.cal_labels[r][c]if r < len(days) and days[r][c] != 0:                    day = days[r][c]                    lbl.configure(text=str(day))# 今天高亮if (self.cal_year == today.year and self.cal_month == today.monthand day == today.day):                        lbl.configure(bg=TODAY_BG, fg=TODAY_FG)elif c >= 5:  # 周末                        lbl.configure(bg=CARD, fg=PINK)else:                        lbl.configure(bg=CARD, fg=TEXT)else:                    lbl.configure(text="", bg=CARD, fg=CARD)def_prev_month(self):        self.cal_month -= 1if self.cal_month < 1:            self.cal_month = 12            self.cal_year -= 1        self._refresh_calendar()def_next_month(self):        self.cal_month += 1if self.cal_month > 12:            self.cal_month = 1            self.cal_year += 1        self._refresh_calendar()def_goto_today(self):        now = datetime.now()        self.cal_year = now.year        self.cal_month = now.month        self._refresh_calendar()# ══════ 右侧工具区 ══════def_build_tools(self, parent):        right = tk.Frame(parent, bg=BG)        right.pack(side="right", fill="both", expand=True, padx=(60))        notebook = ttk.Notebook(right)        notebook.pack(fill="both", expand=True)# 配置 ttk 样式        style = ttk.Style()        style.configure("TNotebook", background=BG)        style.configure("TNotebook.Tab", background=BTN_BG, foreground=TEXT,                        padding=[124], font=F_BODY)        style.map("TNotebook.Tab", background=[("selected", CARD)],                  foreground=[("selected", ACCENT)])# Tab1: 时间戳工具        ts_frame = tk.Frame(notebook, bg=CARD)        notebook.add(ts_frame, text="  ⏱ 时间戳  ")        self._build_timestamp_tab(ts_frame)# Tab2: 倒计时        cd_frame = tk.Frame(notebook, bg=CARD)        notebook.add(cd_frame, text="  ⏳ 倒计时  ")        self._build_countdown_tab(cd_frame)# Tab3: 日期计算        dc_frame = tk.Frame(notebook, bg=CARD)        notebook.add(dc_frame, text="  📅 日期差  ")        self._build_date_calc_tab(dc_frame)def_build_timestamp_tab(self, parent):        px = 12        tk.Label(parent, text="当前时间戳", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        ts_row = tk.Frame(parent, bg=CARD)        ts_row.pack(fill="x", padx=px, pady=4)        self.lbl_ts = tk.Label(ts_row, text="", font=F_MONO, bg=INPUT_BG, fg=TEXT,                               padx=10, pady=4, relief="flat")        self.lbl_ts.pack(side="left", fill="x", expand=True)        tk.Button(ts_row, text="复制", font=F_SMALL, bg=BTN_BG, fg=BTN_FG,                  relief="flat", padx=8, command=self._copy_ts).pack(side="left", padx=(60))# 时间戳转日期        tk.Label(parent, text="时间戳 → 日期", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        row1 = tk.Frame(parent, bg=CARD)        row1.pack(fill="x", padx=px, pady=4)        self.ts_input = tk.Entry(row1, font=F_MONO, bg=INPUT_BG, fg=TEXT, relief="flat", bd=1)        self.ts_input.pack(side="left", fill="x", expand=True, ipady=3)        self.ts_input.insert(0, str(int(time.time())))        tk.Button(row1, text="转换", font=F_SMALL, bg=ACCENT, fg="#ffffff",                  relief="flat", padx=10, command=self._ts_to_date).pack(side="left", padx=(60))        self.lbl_ts_result = tk.Label(parent, text="", font=F_BODY, bg=CARD, fg=GREEN)        self.lbl_ts_result.pack(anchor="w", padx=px, pady=4)# 日期转时间戳        tk.Label(parent, text="日期 → 时间戳", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        row2 = tk.Frame(parent, bg=CARD)        row2.pack(fill="x", padx=px, pady=4)        self.date_input = tk.Entry(row2, font=F_MONO, bg=INPUT_BG, fg=TEXT, relief="flat", bd=1)        self.date_input.pack(side="left", fill="x", expand=True, ipady=3)        self.date_input.insert(0, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))        tk.Button(row2, text="转换", font=F_SMALL, bg=ACCENT, fg="#ffffff",                  relief="flat", padx=10, command=self._date_to_ts).pack(side="left", padx=(60))        self.lbl_date_result = tk.Label(parent, text="", font=F_BODY, bg=CARD, fg=GREEN)        self.lbl_date_result.pack(anchor="w", padx=px, pady=4)def_build_countdown_tab(self, parent):        px = 12        tk.Label(parent, text="自定义倒计时", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        row = tk.Frame(parent, bg=CARD)        row.pack(fill="x", padx=px, pady=4)        tk.Label(row, text="目标日期:", font=F_BODY, bg=CARD, fg=TEXT).pack(side="left")        self.cd_input = tk.Entry(row, font=F_MONO, bg=INPUT_BG, fg=TEXT, relief="flat", bd=1, width=16)        self.cd_input.pack(side="left", padx=6, ipady=3)        self.cd_input.insert(0f"{datetime.now().year}-12-31")        tk.Button(row, text="计算", font=F_SMALL, bg=ACCENT, fg="#ffffff",                  relief="flat", padx=10, command=self._calc_countdown).pack(side="left")        self.lbl_countdown = tk.Label(parent, text="", font=("Microsoft YaHei"14"bold"),                                      bg=CARD, fg=ACCENT)        self.lbl_countdown.pack(anchor="w", padx=px, pady=(84))# 常用倒计时        tk.Label(parent, text="常用倒计时", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        self.countdown_list = tk.Frame(parent, bg=CARD)        self.countdown_list.pack(fill="x", padx=px, pady=4)        self._refresh_common_countdowns()def_build_date_calc_tab(self, parent):        px = 12        tk.Label(parent, text="日期差计算", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(124))        row1 = tk.Frame(parent, bg=CARD)        row1.pack(fill="x", padx=px, pady=4)        tk.Label(row1, text="日期A:", font=F_BODY, bg=CARD, fg=TEXT).pack(side="left")        self.dateA_input = tk.Entry(row1, font=F_MONO, bg=INPUT_BG, fg=TEXT, relief="flat", bd=1, width=14)        self.dateA_input.pack(side="left", padx=6, ipady=3)        self.dateA_input.insert(0, datetime.now().strftime("%Y-%m-%d"))        row2 = tk.Frame(parent, bg=CARD)        row2.pack(fill="x", padx=px, pady=4)        tk.Label(row2, text="日期B:", font=F_BODY, bg=CARD, fg=TEXT).pack(side="left")        self.dateB_input = tk.Entry(row2, font=F_MONO, bg=INPUT_BG, fg=TEXT, relief="flat", bd=1, width=14)        self.dateB_input.pack(side="left", padx=6, ipady=3)        self.dateB_input.insert(0, (datetime.now() + timedelta(days=100)).strftime("%Y-%m-%d"))        tk.Button(parent, text="计算日期差", font=F_BODY, bg=ACCENT, fg="#ffffff",                  relief="flat", padx=16, command=self._calc_date_diff).pack(anchor="w", padx=px, pady=(84))        self.lbl_diff = tk.Label(parent, text="", font=("Microsoft YaHei"12"bold"),                                 bg=CARD, fg=ACCENT)        self.lbl_diff.pack(anchor="w", padx=px, pady=4)# 快捷操作        tk.Label(parent, text="快捷查询", font=F_TITLE, bg=CARD, fg=TEXT).pack(anchor="w", padx=px, pady=(164))        quick_frame = tk.Frame(parent, bg=CARD)        quick_frame.pack(fill="x", padx=px, pady=4)for text, days in [("30天后"30), ("90天后"90), ("180天后"180), ("365天后"365)]:            target = (datetime.now() + timedelta(days=days)).strftime("%Y-%m-%d")            tk.Label(quick_frame, text=f"{text}{target}", font=F_SMALL,                     bg=INPUT_BG, fg=TEXT_SEC, padx=8, pady=3).pack(anchor="w", pady=2)# ══════ 底部世界时钟 ══════def_build_world_clock(self):        world_card = self._card(self.root)        world_card.pack(fill="x", padx=16, pady=(012))        tk.Label(world_card, text="🌍 世界时钟", font=F_TITLE, bg=CARD, fg=TEXT).pack(            anchor="w", padx=12, pady=(84))        self.world_frame = tk.Frame(world_card, bg=CARD)        self.world_frame.pack(fill="x", padx=12, pady=(010))        self.world_zones = [            ("北京"8), ("东京"9), ("伦敦"0),            ("纽约"-4), ("洛杉矶"-7), ("悉尼"10),        ]        self.world_labels = []for i, (city, offset) in enumerate(self.world_zones):            cf = tk.Frame(self.world_frame, bg=INPUT_BG, padx=10, pady=6)            cf.pack(side="left", padx=4, pady=2, fill="x", expand=True)            tk.Label(cf, text=city, font=F_SMALL, bg=INPUT_BG, fg=TEXT_SEC).pack()            lbl = tk.Label(cf, text="--:--", font=F_MONO, bg=INPUT_BG, fg=TEXT)            lbl.pack()            diff = offset - 8# 与北京时差            diff_str = f"UTC{offset:+d}"if offset != 8else"本地"            tk.Label(cf, text=diff_str, font=("Microsoft YaHei"8), bg=INPUT_BG, fg=TEXT_WEAK).pack()            self.world_labels.append((lbl, offset))# ══════ 时钟更新 ══════def_update_clock(self):        now = datetime.now()# 时间        self.lbl_time.configure(text=now.strftime("%H:%M:%S"))# 日期        weekdays = ["星期一""星期二""星期三""星期四""星期五""星期六""星期日"]        self.lbl_date.configure(text=f"{now.strftime('%Y年%m月%d日')}{weekdays[now.weekday()]}")# 农历(尝试加载)        lunar_text = self._get_lunar(now)        self.lbl_lunar.configure(text=lunar_text)# 年度信息        day_of_year = now.timetuple().tm_yday        week_of_year = int(now.strftime("%W"))        days_left = (datetime(now.year, 1231) - now).days        self.lbl_year_info.configure(            text=f"第{day_of_year}天 | 第{week_of_year}周 | 距年末{days_left}天")# 时间戳        ts = int(now.timestamp())        ms_ts = int(now.timestamp() * 1000)        self.lbl_ts.configure(text=f"秒: {ts}  |  毫秒: {ms_ts}")# 世界时钟        utc_now = datetime.now(timezone.utc)for lbl, offset in self.world_labels:            tz_time = utc_now + timedelta(hours=offset)            lbl.configure(text=tz_time.strftime("%H:%M:%S"))        self.root.after(1000, self._update_clock)def_get_lunar(self, dt):"""获取农历日期"""try:from lunarcalendar import Converter, Solar            solar = Solar(dt.year, dt.month, dt.day)            lunar = Converter.Solar2Lunar(solar)            months = ["正""二""三""四""五""六""七""八""九""十""冬""腊"]            days = ["初一""初二""初三""初四""初五""初六""初七""初八""初九""初十","十一""十二""十三""十四""十五""十六""十七""十八""十九""二十","廿一""廿二""廿三""廿四""廿五""廿六""廿七""廿八""廿九""三十"]            m = months[lunar.month - 1]            d = days[lunar.day - 1if lunar.day <= 30else str(lunar.day)returnf"农历 {m}{d}"except ImportError:return"(安装 lunarcalendar 可显示农历)"except Exception:return""# ══════ 工具方法 ══════def_copy_ts(self):        ts = str(int(time.time()))        self.root.clipboard_clear()        self.root.clipboard_append(ts)def_ts_to_date(self):try:            ts = int(self.ts_input.get().strip())if ts > 9999999999:  # 毫秒级                ts = ts // 1000            dt = datetime.fromtimestamp(ts)            self.lbl_ts_result.configure(text=f"→ {dt.strftime('%Y-%m-%d %H:%M:%S')}", fg=GREEN)except Exception as e:            self.lbl_ts_result.configure(text=f"错误: {e}", fg=RED)def_date_to_ts(self):try:            text = self.date_input.get().strip()            dt = datetime.strptime(text, "%Y-%m-%d %H:%M:%S")            ts = int(dt.timestamp())            self.lbl_date_result.configure(text=f"→ {ts} (秒)  |  {ts*1000} (毫秒)", fg=GREEN)except Exception as e:            self.lbl_date_result.configure(text=f"错误: {e}", fg=RED)def_calc_countdown(self):try:            text = self.cd_input.get().strip()            target = datetime.strptime(text, "%Y-%m-%d")            now = datetime.now()            delta = target - nowif delta.total_seconds() > 0:                days = delta.days                hours = delta.seconds // 3600                mins = (delta.seconds % 3600) // 60                self.lbl_countdown.configure(                    text=f"距 {text} 还有 {days}天 {hours}时 {mins}分", fg=ACCENT)else:                days = abs(delta.days)                self.lbl_countdown.configure(text=f"{text} 已过去 {days} 天", fg=RED)except Exception as e:            self.lbl_countdown.configure(text=f"格式错误(请用 YYYY-MM-DD)", fg=RED)def_refresh_common_countdowns(self):for w in self.countdown_list.winfo_children():            w.destroy()        now = datetime.now()        targets = [            ("今天下班 (18:00)", datetime(now.year, now.month, now.day, 1800)),            ("本周末", now + timedelta(days=(5 - now.weekday()) % 7)),            ("元旦", datetime(now.year + 111)),        ]for name, target in targets:            delta = target - nowif delta.total_seconds() > 0:if delta.days > 0:                    text = f"{name}{delta.days}天"else:                    h = delta.seconds // 3600                    m = (delta.seconds % 3600) // 60                    text = f"{name}{h}{m}分"                color = GREENelse:                text = f"{name}:已过"                color = TEXT_WEAK            tk.Label(self.countdown_list, text=text, font=F_BODY, bg=CARD, fg=color).pack(anchor="w", pady=1)def_calc_date_diff(self):try:            a = datetime.strptime(self.dateA_input.get().strip(), "%Y-%m-%d")            b = datetime.strptime(self.dateB_input.get().strip(), "%Y-%m-%d")            diff = abs((b - a).days)            weeks = diff // 7            months_approx = diff / 30.44            self.lbl_diff.configure(                text=f"相差 {diff} 天 (约 {weeks} 周 / {months_approx:.1f} 个月)", fg=ACCENT)except Exception:            self.lbl_diff.configure(text="格式错误(请用 YYYY-MM-DD)", fg=RED)def_toggle_topmost(self):        self.topmost = not self.topmost        self.root.attributes("-topmost", self.topmost)        self.pin_btn.configure(            text="📌 已置顶"if self.topmost else"📌 置顶",            bg=ACCENT if self.topmost else BTN_BG,            fg="#ffffff"if self.topmost else BTN_FG)defrun(self):        self.root.mainloop()if __name__ == "__main__":    app = DateTimeViewer()    app.run()

MIT License

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 23:47:00 HTTP/2.0 GET : https://f.mffb.com.cn/a/507587.html
  2. 运行时间 : 0.313974s [ 吞吐率:3.18req/s ] 内存消耗:4,756.53kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=373418a53201230700da7cf49099cf3b
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000845s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000803s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.003676s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.026726s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001647s ]
  6. SELECT * FROM `set` [ RunTime:0.000660s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001489s ]
  8. SELECT * FROM `article` WHERE `id` = 507587 LIMIT 1 [ RunTime:0.002078s ]
  9. UPDATE `article` SET `lasttime` = 1787327220 WHERE `id` = 507587 [ RunTime:0.058064s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000667s ]
  11. SELECT * FROM `article` WHERE `id` < 507587 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.009136s ]
  12. SELECT * FROM `article` WHERE `id` > 507587 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001258s ]
  13. SELECT * FROM `article` WHERE `id` < 507587 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005306s ]
  14. SELECT * FROM `article` WHERE `id` < 507587 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002014s ]
  15. SELECT * FROM `article` WHERE `id` < 507587 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.021222s ]
0.317712s