From 11f4fdfd0c8b8f4816d417d2d02c830fb4b2fb32 Mon Sep 17 00:00:00 2001 From: "Henning@Mac" Date: Sat, 9 Feb 2013 20:33:31 +0100 Subject: [PATCH] fixes the problem of comparing dates offset-naive and offset-aware datetimes by removing the timezone before comparison --- hyde/ext/plugins/git.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyde/ext/plugins/git.py b/hyde/ext/plugins/git.py index 24c0285..be86bac 100644 --- a/hyde/ext/plugins/git.py +++ b/hyde/ext/plugins/git.py @@ -47,7 +47,9 @@ class GitDatesPlugin(Plugin): continue if created == "git": created = parse(commits[-1].strip()) + created = created.replace(tzinfo=None) resource.meta.created = created if modified == "git": modified = parse(commits[0].strip()) + modified = modified.replace(tzinfo=None) resource.meta.modified = modified