+ error);
                });
            }
        }

        function resetEventTime() {
            if (confirm('Are you sure you want to reset the event time to current time?')) {
                console.log('Resetting event time to current time');
                
                fetch('/api/events/reset_time', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json'
                    }
                })
                .then(res