Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15
STALE3729d

[JGIT PATCH] Expose the raw timezone offset from PersonIdent

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:17
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 .../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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help