public void setUTCDateTime(DateTime dt, int pos) { GPTimeZone tz = getTimeZone(travellingTimezoneIndex); if (tz != null) { dt = dt.AddHours(tz.getOffsetHours()); setDateTime(dt, pos); } }
public DateTime getUTCDateTime(int pos) { DateTime dt = getDateTime(pos); GPTimeZone tz = getTimeZone(travellingTimezoneIndex); if (tz != null) { double offset = tz.getOffsetHours(); dt = dt.AddHours(-offset); } return(dt); }
private void UpdateTimeZoneLabel(int i) { GPTimeZone tz = getTimeZone(travellingTimezoneIndex); Label label = ((i == 0) ? labelTimezone : labelTimezone2); if (tz != null) { label.Text = string.Format("Timezone: {0}", tz.getFullName()); DateTime minDate = minimumUtcTime.AddHours(tz.getOffsetHours()); } else { label.Text = string.Format("Timezone: {0}", "+00:00 UTC"); } }