summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r--git/objects/commit.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index d067b718..dc722f97 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -21,7 +21,8 @@ from .util import (
Serializable,
parse_date,
altz_to_utctz_str,
- parse_actor_and_date
+ parse_actor_and_date,
+ from_timestamp,
)
from git.compat import text_type
@@ -145,6 +146,14 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable):
# END handle attrs
@property
+ def authored_datetime(self):
+ return from_timestamp(self.authored_date, self.author_tz_offset)
+
+ @property
+ def committed_datetime(self):
+ return from_timestamp(self.committed_date, self.committer_tz_offset)
+
+ @property
def summary(self):
""":return: First line of the commit message"""
return self.message.split('\n', 1)[0]