Skip to content
This repository

Use timezone aware timestamps when Django timezone support is enabled. #49

Merged
merged 1 commit into from about 2 years ago

2 participants

Rudolph Froger Patrick Altman
Rudolph Froger

No description provided.

Patrick Altman paltman merged commit 0823e5c into from
Patrick Altman paltman closed this
Patrick Altman
Owner

Thanks, @rudolphfroger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 05, 2012
Rudolph Froger rudolphfroger Fix timezone support for migrations 64c0416
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. +2 3 nashvegas/models.py
5 nashvegas/models.py
... ... @@ -1,12 +1,11 @@
1   -from datetime import datetime
2   -
3 1 from django.db import models
  2 +from django.utils import timezone
4 3
5 4
6 5 class Migration(models.Model):
7 6
8 7 migration_label = models.CharField(max_length=200)
9   - date_created = models.DateTimeField(default=datetime.now)
  8 + date_created = models.DateTimeField(default=timezone.now)
10 9 content = models.TextField()
11 10 scm_version = models.CharField(max_length=50, null=True, blank=True)
12 11

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.