From 876ad153fd25c0605f516b0f3a6407999db69131 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期二, 17 十二月 2024 16:46:37 +0800
Subject: [PATCH] 1. 完善配方列表模块,与对称轴交互 2. 双击修改配方描述 3.配方列表控件动态变化

---
 SourceCode/Bond/BondEq/ToolUnits.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/BondEq/ToolUnits.cpp b/SourceCode/Bond/BondEq/ToolUnits.cpp
index a9b5403..a964ef0 100644
--- a/SourceCode/Bond/BondEq/ToolUnits.cpp
+++ b/SourceCode/Bond/BondEq/ToolUnits.cpp
@@ -286,4 +286,18 @@
 std::string CToolUnits::getRecipePath()
 {
 	return getCurrentExePath() + "\\Recipe";
+}
+
+std::string CToolUnits::getCurrentTimeString()
+{
+	struct tm ltm;
+	time_t now = time(0);
+	localtime_s(&ltm, &now);  // 使用安全的 localtime_s 函数
+
+	char buffer[256];
+	sprintf_s(buffer, sizeof(buffer), "%04d-%02d-%02d %02d:%02d:%02d",
+		ltm.tm_year + 1900, ltm.tm_mon + 1, ltm.tm_mday,
+		ltm.tm_hour, ltm.tm_min, ltm.tm_sec);
+
+	return std::string(buffer);
 }
\ No newline at end of file

--
Gitblit v1.9.3