I am doing a simple alarm that sets off at a given date and time

you cant compare date with ‘’ = ‘’. you need to convert it in millis for comparing with = or use extension for time by @krish.jha

and for date use extension by @vknow360