Esempio n. 1
0
 /// <summary>
 /// 设置时间
 /// </summary>
 /// <param name="date">DateTimeOffset</param>
 /// <param name="time">时间跨度</param>
 public static DateTimeOffset SetDateTime(this DateTimeOffset date, TimeSpan time) => date.SetDateTime(time, null);
Esempio n. 2
0
 /// <summary>
 /// 设置时间
 /// </summary>
 /// <param name="date">DateTimeOffset</param>
 /// <param name="hours">时</param>
 /// <param name="minutes">分</param>
 /// <param name="seconds">秒</param>
 public static DateTimeOffset SetDateTime(this DateTimeOffset date, int hours, int minutes, int seconds) =>
 date.SetDateTime(new TimeSpan(hours, minutes, seconds));