From f5cdb4ebb0ff0fab31089fc75c3e987a244483eb Mon Sep 17 00:00:00 2001 From: Tony Mack <tmack@paris.CS.Princeton.EDU> Date: Wed, 21 Sep 2011 13:19:31 -0400 Subject: [PATCH] compare credential expiration against datetime.utcnow() instead of datetime.today() --- sfa/plc/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 8d0e806d..8de67d67 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -140,7 +140,7 @@ class SfaAPI(BaseAPI): cred = Credential(filename = cred_filename) # make sure cred isnt expired if not cred.get_expiration or \ - datetime.datetime.today() < cred.get_expiration(): + datetime.datetime.utcnow() < cred.get_expiration(): return cred.save_to_string(save_parents=True) # get a new credential -- 2.47.0