mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 19:32:29 -06:00
Revert "replace expiration timezone with utc"
This reverts commit 2809eeeaa4
.
revert changes to demo.py
This commit is contained in:
parent
2809eeeaa4
commit
9641cd34fd
1 changed files with 2 additions and 1 deletions
3
demo.py
3
demo.py
|
@ -276,9 +276,10 @@ async def main(args: argparse.Namespace):
|
|||
if "P:" in str(user.user_id):
|
||||
# logging.info(f"The user is: {user}")
|
||||
cert = x509.load_pem_x509_certificate(user.id_cert.encode('utf-8'))
|
||||
expiration = cert.not_valid_after.astimezone()
|
||||
expiration = cert.not_valid_after
|
||||
logging.info(f'Certificate expires on: {expiration}')
|
||||
reregister_time = expiration - datetime.timedelta(minutes=reregister_within)
|
||||
reregister_time = reregister_time.astimezone(datetime.timezone.utc)
|
||||
logging.info(f'Reregistration will occur at: {reregister_time}')
|
||||
reregister_delta = (reregister_time - datetime.datetime.now(datetime.timezone.utc)).total_seconds()
|
||||
logging.info(
|
||||
|
|
Loading…
Reference in a new issue