If you look at the error message, you'll see what's wrong:
NameError: name 'amount_of_time' is not defined
And another error message, if you'd fix the above one:
NameError: name 'gift' is not defined
Both of these variables exist only within the timer() function, so trying to access them in the birthday() function is not going to work.
I'm not sure what you're trying to achieve in your code. Maybe you can tell in a few sentences what it's supposed to do and then it would be easier to find a proper fix for your code.