public static DTG ToDTG(this DateTime dateTime, TimeZoneInfo timeZone) { var milZoneAbbr = (Mil.TimeZoneOffset)timeZone.GetUtcOffset(dateTime).Hours; var milDateObj = DateTimeMil.GetMilDate(dateTime, milZoneAbbr.ToString()); var dateTimeGroup = new DTG(milDateObj); return(dateTimeGroup); }
public static DateTime?ToDateTime(this DTG dtg) { return(dtg.MilDateOffset?.DateTime); }