private void dateTimePicker1_ValueChanged(object sender, EventArgs e) { if (theTimeZone == null) { return; } DateTime temp = dateTimePicker1.Value - theTimeZone.BaseUtcOffset; if (checkBoxDST.Checked && adjustments.Length != 0) //&& theTimeZone.IsAmbiguousTime(temp.Date) ) { foreach (TimeZoneInfo.AdjustmentRule rule in adjustments) { if (rule.DateEnd < temp.Date || rule.DateStart > temp.Date) { continue; } else { temp -= rule.DaylightDelta; break; } } } utcMoment = new DateTime(temp.Year, temp.Month, temp.Day, temp.Hour, temp.Minute, 0, DateTimeKind.Utc); textBox2.Text = utcMoment.ToString(timeFormat); double julDay = SweWrapper.ToJulianDay(utcMoment); textBox3.Text = julDay.ToString(); }
public PlanetPairAspect(DateTime utc, PlanetId inStar, PlanetId exStar) { utcMoment = utc; Double jul_ut = SweWrapper.ToJulianDay(utc); interiorPos = SweWrapper.PositionOf(jul_ut, inStar, SeFlg.SEFLG_SPEED); exterirorPos = SweWrapper.PositionOf(jul_ut, exStar, SeFlg.SEFLG_SPEED); if (Relation.HasRelation(interiorPos, exterirorPos)) { theRelation = new Relation(interiorPos, exterirorPos); } }