def __init__(self, user = None, experiment = None, start_date = None, origin = None, coord_address = None, reservation_id = None, end_date = None, max_error_in_millis = None, finish_reason = None, permission_permanent_id = None, group_permission = None, user_permission = None, role_permission = None, session_time_micro = None, hostname = None, city = None, country = None, most_specific_subdivision = None):
        super(DbUserUsedExperiment, self).__init__()
        self.user = user
        self.experiment = experiment
        self.start_date, self.start_date_micro = _timestamp_to_splitted_utc_datetime(start_date)
        self.start_date_date = self.start_date.date()
        self.start_date_hour = self.start_date.hour
        self.start_date_weekday = self.start_date.weekday()
        self.start_date_year = self.start_date.year
        self.start_date_month = self.start_date.month
        self.start_date_week_sunday = (self.start_date_date - datetime.date(1970, 1, 4)).days / 7
        self.start_date_week_monday = (self.start_date_date - datetime.date(1970, 1, 5)).days / 7
        self.set_end_date(end_date)
        self.origin = origin
        self.coord_address = coord_address
        self.reservation_id = reservation_id
        self.max_error_in_millis = max_error_in_millis
        self.finish_reason       = finish_reason
        self.permission_permanent_id = permission_permanent_id
        self.group_permission = group_permission
        self.user_permission = user_permission
        self.role_permission = role_permission
        self.hostname = hostname
        self.city = city
        self.country = country
        self.most_specific_subdivision = most_specific_subdivision

        if end_date is not None:
            self.session_time_micro = (self.end_date - self.start_date).seconds * 1e6 + (self.end_date - self.start_date).microseconds
            self.session_time_seconds = self.session_time_micro / 1000000
        else:
            self.session_time_micro = session_time_micro
            if self.session_time_micro:
                self.session_time_seconds = self.session_time_micro / 1000000
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/weblab/db/model.py/DbUserUsedExperiment.__init__/original