Hello, Are you able to send the time stamp to firebase, you might have been using time Unix Time from your devise, that you can retrieve in app, once you get that you can convert to compare with the current time. That's my understanding.
and for the app inventor program How to do, please do some search for the existing similar problems might be it have been addressed already.
How to convert Unix Timestamp,
Thanks