コード例 #1
0
 /// <summary>
 /// Creates a timw zone transition time.
 /// </summary>
 /// <returns>A TimeZoneInfo.TransitionTime.</returns>
 internal override TimeZoneInfo.TransitionTime CreateTransitionTime()
 {
     return(TimeZoneInfo.TransitionTime.CreateFloatingDateRule(
                new DateTime(this.TimeOffset.Ticks),
                this.Month,
                this.WeekIndex == -1 ? 5 : this.WeekIndex,
                EwsUtilities.EwsToSystemDayOfWeek(this.DayOfTheWeek)));
 }
コード例 #2
0
 /// <summary>
 /// Converts this instance to TimeZoneInfo.TransitionTime.
 /// </summary>
 /// <returns>A TimeZoneInfo.TransitionTime</returns>
 TimeZoneInfo.TransitionTime ToTransitionTime()
 {
     if (this.year == 0)
     {
         return(TimeZoneInfo.TransitionTime.CreateFloatingDateRule(
                    new DateTime(
                        DateTime.MinValue.Year,
                        DateTime.MinValue.Month,
                        DateTime.MinValue.Day,
                        this.timeOfDay.Hours,
                        this.timeOfDay.Minutes,
                        this.timeOfDay.Seconds),
                    this.month,
                    this.dayOrder,
                    EwsUtilities.EwsToSystemDayOfWeek(this.dayOfTheWeek)));
     }
     else
     {
         return(TimeZoneInfo.TransitionTime.CreateFixedDateRule(
                    new DateTime(this.timeOfDay.Ticks),
                    this.month,
                    this.dayOrder));
     }
 }