git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH] Expose the raw timezone offset from PersonIdent
@ 2008-09-05  1:37 Shawn O. Pearce
  2008-09-06 15:05 ` Robin Rosenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2008-09-05  1:37 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

Applications may wish to have this value, much as they
can get the raw seconds-since-epoch and reformat it
for their own uses.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../src/org/spearce/jgit/lib/PersonIdent.java      |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PersonIdent.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PersonIdent.java
index 5e524d3..bc5479a 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PersonIdent.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PersonIdent.java
@@ -260,6 +260,14 @@ public TimeZone getTimeZone() {
 		return TimeZone.getTimeZone(ids[0]);
 	}
 
+	/**
+	 * @return this person's preferred time zone as minutes east of UTC. If the
+	 *         timezone is to the west of UTC it is negative.
+	 */
+	public int getTimeZoneOffset() {
+		return tzOffset;
+	}
+
 	public int hashCode() {
 		return getEmailAddress().hashCode() ^ (int) when;
 	}
-- 
1.6.0.1.319.g9f32b

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-06 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05  1:37 [JGIT PATCH] Expose the raw timezone offset from PersonIdent Shawn O. Pearce
2008-09-06 15:05 ` Robin Rosenberg
2008-09-06 19:27   ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).