Git development
 help / color / mirror / Atom feed
From: Junichi Uekawa <dancer@netfort.gr.jp>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] cogito: use locale date_fmt in obtaining default date format
Date: Wed, 12 Oct 2005 23:02:34 +0900	[thread overview]
Message-ID: <878xwyomth.dancerj%dancer@netfort.gr.jp> (raw)

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

Obtain the default date format information from the locale database 
if it's available. Currently, the default date is in a fixed format that 
is mostly US-centric; which results in a very weird-looking Japanese
date.


Signed-off-by: Junichi Uekawa <dancer@debian.org>

---


 cg-Xlib |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)



[-- Attachment #2: date_in_locale.diff --]
[-- Type: application/octet-stream, Size: 515 bytes --]

diff --git a/cg-Xlib b/cg-Xlib
index 0ed275f..d6d0cc1 100755
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -210,7 +210,9 @@ showdate()
 	# bash doesn't like leading zeros
 	[ "${tzhours:1:1}" = 0 ] && tzhours=${2:0:1}${2:2:1}
 	secs=$(($secs + $tzhours * 3600 + $tzmins * 60))
-	[ "$format" ] || format="+%a, %d %b %Y %H:%M:%S $2"
+	[ "$format" ] || \
+		format="+$(locale date_fmt)" || \
+		format="+%a, %d %b %Y %H:%M:%S $2"
 	if [ "$has_gnudate" ]; then
 		LANG=C $has_gnudate -ud "1970-01-01 UTC + $secs sec" "$format"
 	else

             reply	other threads:[~2005-10-12 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 14:02 Junichi Uekawa [this message]
2005-10-12 15:26 ` [PATCH] cogito: use locale date_fmt in obtaining default date format Junichi Uekawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878xwyomth.dancerj%dancer@netfort.gr.jp \
    --to=dancer@netfort.gr.jp \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox