I have 2 conditionals at the beginning of a template that are supposed to redirect the visitor to a different template if they are hitting the page outside of 2 different time spans, but the redirect is not working.
{if '{current_time format="%U"}' < '{start_date_1}' AND '{current_time format="%U"}' > '{end_date_1}'}{redirect="/closed"}{/if}
{if '{current_time format="%U"}' < '{start_date_2}' AND '{current_time format="%U"}' > '{end_date_2}'}{redirect="/closed"}{/if}
{start_date_1}, {start_date_2}, {end_date_1} & {end_date_2} are global variables.
Any help is appreciated.
{current_time format="%U"}
will be UNIX time so start_date_x and end_date_x should be in same.