From f68cf2effeb569f902429ba66728b1de37e3a498 Mon Sep 17 00:00:00 2001 From: ZKWolf Date: Thu, 8 Jun 2023 01:17:58 +0200 Subject: [PATCH] Added time_handler.py --- src/logic/time_handler.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/logic/time_handler.py diff --git a/src/logic/time_handler.py b/src/logic/time_handler.py new file mode 100644 index 0000000..6dc3a0b --- /dev/null +++ b/src/logic/time_handler.py @@ -0,0 +1,11 @@ +import datetime + + +def get_time(): + current_datetime = datetime.datetime.now() + current_timestamp = int(current_datetime.timestamp()) + + duration = 86400 + expiration_timestamp = current_timestamp + duration + + return current_timestamp, expiration_timestamp