public DateTime SolarTimeToOriginalTime(DateTime solarTime)
        {
            var localTime = SolarTime.GetLocalTime(solarTime,
                                                   this.longitudeDegrees,
                                                   this.timeZone.BaseUtcOffset);
            var utcTime = localTime - this.timeZone.BaseUtcOffset;

            return(utcTime);
        }
示例#2
0
        public DateTime SolarTimeToOriginalTime(DateTime solarTime)
        {
            var localTime = SolarTime.GetLocalTime(solarTime,
                                                   this.longitudeDegrees,
                                                   this.timeZone.BaseUtcOffset);

            if (timeZone.IsDaylightSavingTime(localTime))
            {
                localTime += TimeSpan.FromHours(1);
            }
            return(localTime);
        }
 public DateTime SolarTimeToOriginalTime(DateTime solarTime)
 => SolarTime.GetLocalTime(solarTime,
                           this.longitudeDegrees,
                           this.timeZone.BaseUtcOffset);