Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for getting "aware" datetime info#414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 2 commits intogitpython-developers:masterfromnvie:support-full-datetimes-on-commits
Apr 20, 2016
Merged

Add support for getting "aware" datetime info#414

Byron merged 2 commits intogitpython-developers:masterfromnvie:support-full-datetimes-on-commits
Apr 20, 2016

Conversation

nvie
Copy link
Contributor

@nvienvie commentedApr 19, 2016
edited
Loading

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, respectivelyauthored_date andcommitted_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.)

This adds 2 properties to commits.  Their values are derived from theexisting data stored on them, but this makes them more convenientlyqueryable:    - authored_datetime    - committed_datetimeThese return "aware" datetimes, so they are effectively companions totheir raw timestamp equivalents, respectively `authored_date` and`committed_date`.These datetime instances are convenient structures since they show theauthor-local commit date and their UTC offset.
@ByronByron added this to thev1.1.0 - Features and Fixes milestoneApr 20, 2016
@Byron
Copy link
Member

Thank you, looks good to me !

@ByronByron merged commitd04aeaa intogitpython-developers:masterApr 20, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@ByronByron

Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
@nvie@Byron

[8]ページ先頭

©2009-2025 Movatter.jp