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(<m, &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); }