Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

All dates in database should be UTC

Forgot to enforce this when date not provided.
  • Loading branch information...
commit d2b1251195e620acd19dc74ccbe11639310b1041 1 parent ce08eed
@sandyarmstrong sandyarmstrong authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 api/handlers.py
View
4 api/handlers.py
@@ -165,7 +165,7 @@ def clean_date(date):
if c.has_key('last-metadata-change-date'):
note.modified = clean_date(c['last-metadata-change-date'])
else:
- note.modified = datetime.now()
+ note.modified = datetime.utcnow()
if c.has_key('create-date'): note.created = clean_date(c['create-date'])
if c.has_key('open-on-startup'): note.open_on_startup = (c['open-on-startup'] == True)
if c.has_key('pinned'): note.pinned = (c['pinned'] == True)
@@ -183,7 +183,7 @@ def clean_date(date):
if len(changes) > 0:
profile.latest_sync_rev = new_sync_rev
profile.save()
-
+
return {
'latest-sync-revision': profile.latest_sync_rev,
'notes': [simple_describe_note(n) for n in Note.objects.filter(author=author)]
Please sign in to comment.
Something went wrong with that request. Please try again.