File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1717import os
1818import hashlib
1919from time import sleep
20- from datetime import datetime
20+ from datetime import datetime , UTC
2121
2222# import json as jsond
2323# ^^ only for auto login/json writing/reading
@@ -173,15 +173,15 @@ def answer():
173173subs = keyauthapp .user_data .subscriptions # Get all Subscription names, expiry, and timeleft
174174for i in range (len (subs )):
175175 sub = subs [i ]["subscription" ] # Subscription from every Sub
176- expiry = datetime .utcfromtimestamp (int (subs [i ]["expiry" ])).strftime (
176+ expiry = datetime .fromtimestamp (int (subs [i ]["expiry" ]), UTC ).strftime (
177177 '%Y-%m-%d %H:%M:%S' ) # Expiry date from every Sub
178178 timeleft = subs [i ]["timeleft" ] # Timeleft from every Sub
179179
180180 print (f"[{ i + 1 } / { len (subs )} ] | Subscription: { sub } - Expiry: { expiry } - Timeleft: { timeleft } " )
181181
182- print ("Created at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .createdate )).strftime ('%Y-%m-%d %H:%M:%S' ))
183- print ("Last login at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .lastlogin )).strftime ('%Y-%m-%d %H:%M:%S' ))
184- print ("Expires at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .expires )).strftime ('%Y-%m-%d %H:%M:%S' ))
182+ print ("Created at: " + datetime .fromtimestamp (int (keyauthapp .user_data .createdate ), UTC ).strftime ('%Y-%m-%d %H:%M:%S' ))
183+ print ("Last login at: " + datetime .fromtimestamp (int (keyauthapp .user_data .lastlogin ), UTC ).strftime ('%Y-%m-%d %H:%M:%S' ))
184+ print ("Expires at: " + datetime .fromtimestamp (int (keyauthapp .user_data .expires ), UTC ).strftime ('%Y-%m-%d %H:%M:%S' ))
185185print ("\n Exiting in five seconds.." )
186186sleep (5 )
187187os ._exit (1 )
You can’t perform that action at this time.
0 commit comments