git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH 1/4] log command: Use explicit US locale for dates

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Oct 12, 2008, 22:50 UTC
Message-ID
<1223851860-13068-2-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1223851860-13068-1-git-send-email-robin.rosenberg@dewire.com>

The format used is a variation of the US locale and looks odd when localized anyway so do not try to localize it.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/jgit/pgm/Log.java              |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Log.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Log.java
index e16387b..e3a32c8 100644
--- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Log.java
+++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Log.java
@@ -40,6 +40,7 @@
 
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
+import java.util.Locale;
 import java.util.TimeZone;
 
 import org.spearce.jgit.lib.PersonIdent;
@@ -52,7 +53,7 @@
 	private final DateFormat fmt;
 
 	Log() {
-		fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ");
+		fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US);
 	}
 
 	@Override
-- 
1.6.0.2.308.gef4a
Previous: Robin RosenbergNext: Robin Rosenberg
Message 2 of 8 in “Decodings”
  1. 0/4 DecodingsRobin Rosenberg, Oct 12, 2008
  2. 1/4 log command: Use explicit US locale for datesRobin Rosenberg, Oct 12, 2008
  3. 2/4 jgit programs: Use i18n.logOutputEncoding or user's locale for outputRobin Rosenberg, Oct 12, 2008
  4. 3/4 The git config file is case insensitiveRobin Rosenberg, Oct 12, 2008
  5. 4/4 Intelligent parsing of ambiguously encoded meta data.Robin Rosenberg, Oct 12, 2008
  6. Shawn O. PearceOct 13, 2008
  7. Robin RosenbergOct 13, 2008
  8. Shawn O. PearceOct 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.