From bb463ef0b13236738a1da9cd04f57def3e7e2c7c Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期五, 29 八月 2025 15:21:51 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/Utility/TimeUtility.cs | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/Main/Utility/TimeUtility.cs b/Main/Utility/TimeUtility.cs index 6f2678a..e49d754 100644 --- a/Main/Utility/TimeUtility.cs +++ b/Main/Utility/TimeUtility.cs @@ -345,6 +345,21 @@ } //渚嬪瓙 + //澶т簬24灏忔椂鏄剧ず锛歺澶﹛x灏忔椂xx鍒� + //灏忎簬24灏忔椂鏄剧ず锛歺x:xx:xx + public static string SecondsToDHMSEx(int _seconds) + { + int days = _seconds / 86400; + int hours = _seconds % 86400 / 3600; + int mins = _seconds % 3600 / 60; + int seconds = _seconds % 60; + if (days > 0) + { + return StringUtility.Contact(days, Language.Get("L1074"), hours.ToString("D2"), Language.Get("L1072"), mins.ToString("D2"), Language.Get("L1073")); + } + return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2")); + } + //渚嬪瓙 //x澶� //x鏃� //x鍒唜绉� -- Gitblit v1.8.0