From c9eb1518f31f7ffe5ae76190312877f238b0e79c Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sun, 14 Mar 2010 11:03:08 +0000 Subject: [PATCH] Use utcnow() when updating the API stamp --- eve_api/api_puller/accounts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eve_api/api_puller/accounts.py b/eve_api/api_puller/accounts.py index 1620d61..86ac2a0 100755 --- a/eve_api/api_puller/accounts.py +++ b/eve_api/api_puller/accounts.py @@ -10,6 +10,8 @@ if __name__ == "__main__": from importer_path import fix_environment fix_environment() +from datetime import datetime + from django.conf import settings from eve_proxy.models import CachedDocument from eve_api.app_defines import * @@ -50,7 +52,7 @@ def import_eve_account(api_key, user_id): account.api_key = api_key account.api_user_id = user_id - account.api_last_updated = datetime.now() + account.api_last_updated = datetime.utcnow() account.api_status = API_STATUS_OK account.save() @@ -67,6 +69,7 @@ def import_eve_account(api_key, user_id): # Save these for last to keep the save count low. pchar.name = name pchar.corporation = corp + pchar.api_last_updated = datetime.utcnow() pchar.save() account.characters.add(pchar) except AttributeError: