Skip to content

Conversation

nvie
Copy link
Contributor

@nvie nvie commented Apr 19, 2016

This adds 2 properties to commits. Their values are derived from the existing data stored on them, but this makes them more conveniently queryable:

  • authored_datetime
  • committed_datetime

These return "aware" datetimes, so they are effectively companions to their raw timestamp equivalents, respectively authored_date and committed_date.

These datetime instances are convenient structures since they show the author-local commit date and their UTC offset.

(I've implemented a tzinfo subclass here manually to avoid adding a dependency to dateutil or pytz here.)

nvie added 2 commits April 19, 2016 21:52
This adds 2 properties to commits.  Their values are derived from the
existing data stored on them, but this makes them more conveniently
queryable:

    - authored_datetime
    - committed_datetime

These return "aware" datetimes, so they are effectively companions to
their raw timestamp equivalents, respectively `authored_date` and
`committed_date`.

These datetime instances are convenient structures since they show the
author-local commit date and their UTC offset.
@Byron Byron added this to the v1.1.0 - Features and Fixes milestone Apr 20, 2016
@Byron
Copy link
Member

Byron commented Apr 20, 2016

Thank you, looks good to me !

@Byron Byron merged commit d04aeaa into gitpython-developers:master Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants