having issues with giveTime method, cant access getTime's return value