/// <summary> /// Assigns the Token's creation time based on information received the Crestron processor /// </summary> /// <param name="creationDateString">The formatted string value received from the processor</param> public void SetCreation(string creationDateString) { DateTime dateVal; dateVal = GetDateFromString(creationDateString); created_at = Calculators.GetUtcDateFromDateTime(dateVal); }
/// <summary> /// Assigns the expiration time/date based o information received from the Crestron processor /// </summary> /// <param name="expirationDateString">The formatted string value received </param> public void SetExpiration(string expirationDateString) { DateTime dateVal; double totalVal; double expiresInVal; dateVal = GetDateFromString(expirationDateString); // Get the DateTime value from the received string totalVal = Calculators.GetUtcDateFromDateTime(dateVal); // Get the UNIX converted value from the date expiresInVal = totalVal - created_at; // Subtract the created date from the expires date }