0

How to convert create date of role to utc

I am trying to find the age of a role by getting difference between created time and todays time.. Here I am trying to convert created date and time to utc which is not working as expected.. Can anyone help me with this?

9th Jun 2020, 5:03 AM
Suman Thandale
Suman Thandale - avatar
1 Respuesta
0
date=key.createdate date=date.astimezone(pytz.utc) Using above one to convert obtained date into utc
9th Jun 2020, 6:14 AM
Suman Thandale
Suman Thandale - avatar