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 string DTGAsString) { return(new DTG(DateTimeMil.GetMilDateFromString(DTGAsString)).ToDateTime()); }