summaryrefslogtreecommitdiff
path: root/src/git2/commit.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2010-12-10 16:30:06 +0100
committernulltoken <emeric.fermas@gmail.com>2010-12-10 16:30:06 +0100
commit13710f1e86d9048b88361092a94b4648aeb864fd (patch)
tree488f4576ca32f58f235ac30e9299966def6e33f3 /src/git2/commit.h
parent2cd6d6866e45939c7a60ff5f4cca52b02c8af498 (diff)
downloadlibgit2-13710f1e86d9048b88361092a94b4648aeb864fd.tar.gz
Added timezone offset parsing and outputting.
Diffstat (limited to 'src/git2/commit.h')
-rw-r--r--src/git2/commit.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/git2/commit.h b/src/git2/commit.h
index 728679758..54b0ed872 100644
--- a/src/git2/commit.h
+++ b/src/git2/commit.h
@@ -93,6 +93,13 @@ GIT_EXTERN(const char *) git_commit_message(git_commit *commit);
GIT_EXTERN(time_t) git_commit_time(git_commit *commit);
/**
+ * Get the commit timezone offset (i.e. committer's preferred timezone) of a commit.
+ * @param commit a previously loaded commit.
+ * @return positive or negative timezone offset, in minutes from UTC
+ */
+GIT_EXTERN(int) git_commit_timezone_offset(git_commit *commit);
+
+/**
* Get the committer of a commit.
* @param commit a previously loaded commit.
* @return the committer of a commit
@@ -150,8 +157,9 @@ GIT_EXTERN(void) git_commit_set_message(git_commit *commit, const char *message)
* @param name name of the new committer
* @param email email of the new committer
* @param time time when the committer committed the commit
+ * @param offset committer positive or negative timezone offset, in minutes from UTC
*/
-GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name, const char *email, time_t time);
+GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name, const char *email, time_t time, int offset);
/**
* Set the author of a commit
@@ -159,8 +167,9 @@ GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name,
* @param name name of the new author
* @param email email of the new author
* @param time time when the author created the commit
+ * @param offset author positive or negative timezone offset, in minutes from UTC
*/
-GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const char *name, const char *email, time_t time);
+GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const char *name, const char *email, time_t time, int offset);
/**
* Set the tree which is pointed to by a commit