public DateTime SolarTimeToOriginalTime(DateTime solarTime) { var localTime = SolarTime.GetLocalTime(solarTime, this.longitudeDegrees, this.timeZone.BaseUtcOffset); var utcTime = localTime - this.timeZone.BaseUtcOffset; return(utcTime); }
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);