Im working with django and a some python code, but now i get the TypeError:can't subtract offset-naive and offset-aware datetimes
Now i guess that django uses Europe/Amsterdam timezone and i don't think i use one with python.
class SkillTrainingTimer(models.Model):
character = models.ForeignKey(Character, unique=True)
skill = models.ForeignKey(Skill, blank=True)
trainingground = models.ForeignKey(TrainingGround)
timer = models.DateTimeField()
def time_remaining(self):
remaining = datetime.datetime.now() - self.timer
return remaining
how can i add the timezone using python 2.7 ?