Optimized the formattedDate and getActiveTimeZone functions for better execution times.