I have a field timestamp = models.DateTimeField(auto_now_add=True) in the db. I want to find the difference between that timestamp and datetime.now().
When I tried datet
Holá The short answer is:
tz_info = your_timezone_aware_variable.tzinfo diff = datetime.datetime.now(tz_info) - your_timezone_aware_variable:
You must add the timezone info to your now() time. But you must add the same timezone of the variable, thats why I first read the tzinfo attribute.