lcy
2025-11-05 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4
Main/Utility/TimeUtility.cs
@@ -194,7 +194,7 @@
    }
    public static event Action OnServerOpenDayRefresh;
    public static void OnRefreshServerOpenDay(HA005_tagOpenServerDay package)
    public static void OnRefreshServerOpenDay(HA103_tagMCOpenServerDay package)
    {
        {
            OpenDay = package.Day;
@@ -251,6 +251,7 @@
        int seconds = _seconds % 60;
        return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2"));
    }
    //详细显示
    //xx小时xx分XX秒
@@ -424,7 +425,7 @@
    //例子
    //x天
    //x时
    //x分x秒
    //x分
    //x秒
    public static string SecondsToConsumeRebate(int _seconds)
    {
@@ -438,15 +439,15 @@
        }
        else if (hours >= 1)
        {
            return StringUtility.Contact(Mathf.CeilToInt(hours), Language.Get("Hour"));
            return StringUtility.Contact(Mathf.CeilToInt(hours), Language.Get("L1072"));
        }
        else if (mins >= 1)
        {
            return StringUtility.Contact(mins, Language.Get("Minute"), seconds, Language.Get("RealmWin_Bewrite_35"));
            return StringUtility.Contact(mins, Language.Get("L1073"));
        }
        else
        {
            return StringUtility.Contact(seconds, Language.Get("RealmWin_Bewrite_35"));
            return StringUtility.Contact(seconds, Language.Get("L1075"));
        }
    }
@@ -495,6 +496,17 @@
    }
    // 到10点还要多少秒,如果已经过了10点,返回0
    public static int GetToTenClockSeconds()
    {
        var now = ServerNow;
        if (now.Hour < 10)
        {
            return (int)(ServerNow - new DateTime(now.Year, now.Month, now.Day, 10, 0, 0)).TotalSeconds;
        }
        return 0;
    }
    //开服天结束倒计时;单位秒
    public static int GetRemindTimeByOpenDay(int days)
    {