yyl
2025-12-04 5f728e2633e8e20ebafc4e534fe7e7362362c839
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;
@@ -496,13 +496,13 @@
    }
    // 到10点还要多少秒,如果已经过了10点,返回0
    public static int GetToTenClockSeconds()
    // 今日到x点还要多少秒,如果已经过了x点,返回0
    public static int GetToTheHourSeconds(int hour=10)
    {
        var now = ServerNow;
        if (now.Hour < 10)
        if (now.Hour < hour)
        {
            return (int)(ServerNow - new DateTime(now.Year, now.Month, now.Day, 10, 0, 0)).TotalSeconds;
            return (int)(new DateTime(now.Year, now.Month, now.Day, hour, 0, 0) - ServerNow).TotalSeconds;
        }
        return 0;
    }