From 65903ba3c5ce1e470f009fbc7c93d47ab1553a96 Mon Sep 17 00:00:00 2001 From: JJTech Date: Mon, 6 Nov 2023 17:08:36 -0500 Subject: [PATCH 1/2] fix a stupid bug --- demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.py b/demo.py index 7762505..de5fb0f 100644 --- a/demo.py +++ b/demo.py @@ -217,7 +217,7 @@ async def main(args: argparse.Namespace): await trio.sleep(reregister_delta) logging.info("Reregistering...") - register(conn, users) + expiration = await reregister(conn, users) logging.info("Reregistered!") From 47eaae9edc8d44fd064753a15f9e6d522f66a9e1 Mon Sep 17 00:00:00 2001 From: SpaceSaver <60277022+SpaceSaver@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:25:23 -0500 Subject: [PATCH 2/2] Enable viewing the date for expiry --- demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.py b/demo.py index de5fb0f..60eb440 100644 --- a/demo.py +++ b/demo.py @@ -88,7 +88,7 @@ async def main(args: argparse.Namespace): expiration = None # Format time as HH:MM:SS PM/AM EST/EDT (X minutes from now) - expire_msg = lambda expiration: f"Number registration is valid until {str(expiration.astimezone().strftime('%I:%M:%S %p %Z'))} ({str(int((expiration - datetime.datetime.now(datetime.timezone.utc)).total_seconds()/60))} minutes from now)" + expire_msg = lambda expiration: f"Number registration is valid until {str(expiration.astimezone().strftime('%x %I:%M:%S %p %Z'))} ({str(int((expiration - datetime.datetime.now(datetime.timezone.utc)).total_seconds()/60))} minutes from now)" email_user = None email_addr = None # For HACK below