(function() {
var currentDate = new Date();
var targetTime = new Date();
// Set target time to today at 3 PM (Los Angeles Time)
targetTime.setHours(15, 0, 0, 0); // Set time to 3 PM today
// If the current time is past 3 PM, set the target to 3 PM the next day
if (currentDate.getTime() > targetTime.getTime()) {
targetTime.setDate(targetTime.getDate() + 1); // Move to the next day
}
// Set the countdown timer's end date to the calculated target time
var countdownDate = targetTime.toISOString();
// Update Elementor's countdown widget with the new date
document.querySelectorAll('.elementor-countdown').forEach(function(widget) {
widget.setAttribute("data-date", countdownDate); // Update the countdown date attribute
});
})();