Esempio n. 1
0
 /// <summary>
 /// 设置时间
 /// </summary>
 /// <param name="date">DateTimeOffset</param>
 /// <param name="time">时间跨度</param>
 /// <param name="localTimeZone">时区</param>
 public static DateTimeOffset SetDateTime(this DateTimeOffset date, TimeSpan time, TimeZoneInfo localTimeZone) =>
 date.ToLocalDateTime(localTimeZone).SetDateTime(time).ToDateTimeOffset(localTimeZone);