public bool Equals(AdjustmentRule?other) =>
 other != null &&
 _dateStart == other._dateStart &&
 _dateEnd == other._dateEnd &&
 _daylightDelta == other._daylightDelta &&
 _baseUtcOffsetDelta == other._baseUtcOffsetDelta &&
 _daylightTransitionEnd.Equals(other._daylightTransitionEnd) &&
 _daylightTransitionStart.Equals(other._daylightTransitionStart);
Esempio n. 2
0
 public OffsetAndRule GetOneYearLocalFromUtc(int year)
 {
     OffsetAndRule? oneYearLocFromUtc = _oneYearLocalFromUtc;
     if (oneYearLocFromUtc == null || oneYearLocFromUtc.Year != year)
     {
         TimeZoneInfo currentYear = GetCurrentOneYearLocal();
         AdjustmentRule? rule = currentYear._adjustmentRules == null ? null : currentYear._adjustmentRules[0];
         oneYearLocFromUtc = new OffsetAndRule(year, currentYear.BaseUtcOffset, rule);
         _oneYearLocalFromUtc = oneYearLocFromUtc;
     }
     return oneYearLocFromUtc;
 }
Esempio n. 3
0
 public OffsetAndRule(int year, TimeSpan offset, AdjustmentRule?rule)
 {
     Year   = year;
     Offset = offset;
     Rule   = rule;
 }