Setting time zone using session and if statment

So I have a relevance statement that works and gathers the information I need if utc time flag = true. I would like to expand this to use an if else so if the flag is set to false then I can set time zone to -0400 but am not sure how to combine both these statements into one statement, so i can use the API to pull the info. Below are the statements and they both work using the API separate. Any help would be great.

<script>

(names of elements of reported computer set of it,name of it, start date of it,start time_of_day of it & "+0400" as time zone,end date of it ,end time_of_day of it & "+0400" as time zone) of top level bes actions whose(multiple flag of it and utc time flag of it=True AND "Open" = state of it AND name of it contains "factset - test email" ) 

</script>

<script>

(names of elements of reported computer set of it,name of it, start date of it,start time_of_day of it & "-0400" as time zone,end date of it ,end time_of_day of it & "-0400" as time zone) of top level bes actions whose(multiple flag of it and utc time flag of it=Flase AND "Open" = state of it AND name of it contains "factset - test email" ) 

</script>

This snippet should help, you’ll have to adjust to put the rest of your properties back in …

(names of it, start dates of it, start time_of_day of it & (if utc time flag of it then "+0400" as time zone else "-0400" as time zone), utc time flags of it) of bes actions whose (multiple flag of it and state of it = "Open")