def calculate_timezone_aware_durations(apps, schema_editor):
        """
        Adjust incorrect stored durations. Previously these were calculated
        with the user's timezone and did not account for DST. There is no
        reverse code for this migration as we don't know what timezone the
        original duration calculation used.
        """
        for model_name in ["Feeding", "Pumping", "Sleep", "TummyTime"]:
            model = apps.get_model("core", model_name)
            for instance in model.objects.all():
                new_duration = timezone_aware_duration(instance.start, instance.end)
                if instance.duration != new_duration:
                    instance.duration = new_duration
                    instance.save()

        Adjust incorrect stored durations. Previously these were calculated
        with the user's timezone and did not account for DST. There is no
        reverse code for this migration as we don't know what timezone the
        original duration calculation used.
        
core/migrations/0035_recalculate_durations.py