I ran into a problem in my django application while working with DateTimeField. Its mainly due to changes in DST time.
I created the event on October 30, 2015 (DST last week). I created a copy of the first event, which will be held from November 06 to 15 (without DST day).
I applied timedeltafrom 7 days, so it canceled days to 7+. But I didn’t see Timedelta for hours.
Due to the preservation of daylight, it is reduced by one hour . I do not need it. I just want to have the same watch. How can i do this?
I tried with this, but did not help me.
DST timezone issue in django app
See this screenshot

my models.py
from django.db import models
from datetime import timedelta
class Event(models.Model):
name = models.CharField(max_length=100)
created = models.DateTimeField(auto_now_add=True)
start_date = models.DateTimeField()
def __unicode__(self):
return self.name
def copy_event(self, add_days=timedelta(days=7)):
start_date = self.start_date + add_days
name = self.name +' (copy)'
new_event = Event(name = name,created = self.created,start_date=start_date,)
new_event.save()
return new_event