[gitg] Correctly set author date in hooks
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Correctly set author date in hooks
- Date: Sat, 6 Jul 2013 10:24:20 +0000 (UTC)
commit 2a663d52d014443c5b1d37624f493599e1df6604
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sat Jul 6 12:23:39 2013 +0200
Correctly set author date in hooks
libgitg/gitg-stage.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-stage.vala b/libgitg/gitg-stage.vala
index 1a9e7ed..cd6f08e 100644
--- a/libgitg/gitg-stage.vala
+++ b/libgitg/gitg-stage.vala
@@ -173,7 +173,13 @@ public class Stage : Object
{
hook.environment["GIT_AUTHOR_NAME"] = author.get_name();
hook.environment["GIT_AUTHOR_EMAIL"] = author.get_email();
- hook.environment["GIT_AUTHOR_DATE"] = author.get_email();
+
+ var date = author.get_time();
+
+ var un = date.to_unix();
+ var tz = date.to_timezone(author.get_time_zone()).format("%z");
+
+ hook.environment["GIT_AUTHOR_DATE"] = @"@$(un) $(tz)";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]