diff options
author | Dan McGee <dan@archlinux.org> | 2011-04-07 15:39:53 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-07 17:03:00 -0500 |
commit | 01db07bad844e17e084f650b6732647f77a91c5c (patch) | |
tree | 3260bae1697f2aaac5140f20ea9d0e30953a5be7 /devel/management/commands | |
parent | 7d08d59280dc4ddbe43f277e177bce683dd51188 (diff) |
Use UTC datetime objects everywhere
Rather than the twisted mix of local times and UTC times we currently have.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management/commands')
-rw-r--r-- | devel/management/commands/reporead.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index e26bb800..a8875c7e 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -315,7 +315,7 @@ def populate_files(dbpkg, repopkg, force=False): directory=dirname + '/', filename=filename) pkgfile.save(force_insert=True) - dbpkg.files_last_update = datetime.now() + dbpkg.files_last_update = datetime.utcnow() dbpkg.save() @transaction.commit_on_success @@ -374,7 +374,7 @@ def db_update(archname, reponame, pkgs, options): for p in [x for x in pkgs if x.name in in_sync_not_db]: logger.info("Adding package %s", p.name) pkg = Package(pkgname = p.name, arch = architecture, repo = repository) - populate_pkg(pkg, p, timestamp=datetime.now()) + populate_pkg(pkg, p, timestamp=datetime.utcnow()) # packages in database and not in syncdb (remove from database) in_db_not_sync = dbset - syncset @@ -398,7 +398,7 @@ def db_update(archname, reponame, pkgs, options): if not force: continue else: - timestamp = datetime.now() + timestamp = datetime.utcnow() if filesonly: logger.debug("Checking files for package %s in database", p.name) populate_files(dbp, p, force=force) |