Move timezone check to external JS