@classmethod
def from_datetime(cls, datetime_object):
    """
        Convert a datetime to a gnsstime.
        """
    dto = datetime_object
    return cls(dto.year, dto.month, dto.day, dto.hour, dto.minute, dto.
        second, dto.microsecond)
