switch from naive timestamps to timezone-aware timestamps
diff --git a/planetstack/core/models/billing.py b/planetstack/core/models/billing.py
index 6d1c331..8c61418 100644
--- a/planetstack/core/models/billing.py
+++ b/planetstack/core/models/billing.py
@@ -6,6 +6,7 @@
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.db.models import Sum
+from django.utils import timezone
class Account(PlCoreBase):
site = models.ForeignKey(Site, related_name="accounts", help_text="Site for this account")
@@ -51,7 +52,7 @@
class Payment(PlCoreBase):
account = models.ForeignKey(Account, related_name="payments")
amount = models.FloatField(default=0.0)
- date = models.DateTimeField(default=datetime.datetime.now)
+ date = models.DateTimeField(default=timezone.now)
def __unicode__(self): return u'%s-%0.2f-%s' % (self.account.site.name, self.amount, str(self.date))