Debug.Log(DateTime.Now); Debug.Log(DateTime.Now.AddDays(1)); DateTime dt = new DateTime(DateTime.Now.Year , DateTime.Now.Month, DateTime.Now.AddDays(1).Day , 0, 0, 0); TimeSpan span = dt - DateTime.Now; Debug.Log(span.TotalHours.ToString("00")); Debug.Log((span.TotalMinutes % 60).ToString("00") ); string nextTime = span.TotalHours.ToString("0") + ":" + (span.TotalMinutes % 60).ToString("0"); Debug.Log(nextTime);
时间: 2024-11-04 10:07:36