   .catch(error => {
                    console.error('Error:', error);
                    alert('Error setting event: ' + error);
                });
            }
        }

        function adjustEventTime(minutesOffset) {
            if (confirm(`Are you sure you want to adjust the event time by ${minutesOffset > 0 ? '+' : ''}${minutesOffset} minutes?`)) {
                console.log(`Adjusting event time by ${minutesOffset} minutes`);
                
                fetch('/api/events/adjust_time', 