Making an alarm turn off when you press a button..

I have set up a code that keeps time in hours, minutes and seconds. I want an alarm to go off at a certain time and continue to ring until I push a switch.
The snippet of code that I am using for the alarm portion of the code is

if (h==8 && m==30 && s==0 && B==1){
do{
tone(sound,330);
}
while(B==1);

I thought that this code would cause the tone to begin and then end once the switch pin no longer read 1. This isn't the case.
I tried this too..

do{
tone(sound,330);
}
while(h==8 && m==30 && s>=0 &&s <=59 && B==1);

I'm honestly lost. Can someone help? I'm not very good with arduino so try to keep explanations elementary.

Why don't you set a flag at the set time
Then in the loop if alarmflag equals true make sound.
Also check button state and if true set alarmflag to false

  if (h==8 && m==30 && s==0 && B==1){
    do{
      tone(sound,330);
    }
    while(B==1);

You never change B. If b==1 it goes into the loop and stays there while B==1. If B is supposed to be the value read from the switch, the read the value in the loop (ie, set B = digitalRead(yourPin); ).