def on_until_view_changed(self, qdatetime): # When GUI is updated self.model.until = QDateTime.toPython(qdatetime)
def as_datetime(qdatetime): assert isinstance(qdatetime, QDateTime) return QDateTime.toPython(qdatetime).replace(tzinfo=LOCAL_TIMEZONE)
def on_since_view_changed(self, qdatetime): # When GUI is updated self.model.since = QDateTime.toPython(qdatetime)