summaryrefslogtreecommitdiff
path: root/lib/choose_rev.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-10 05:54:16 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-10 05:54:16 (GMT)
commit66c75a5c9f7434d857d836440dc1c3046c59b5f3 (patch)
tree5753b6221f18678cef90bfa028c34310869687dc /lib/choose_rev.tcl
parent93716a62c07561467a5c6fb0e14c4897cf264e7e (diff)
downloadgit-66c75a5c9f7434d857d836440dc1c3046c59b5f3.zip
git-66c75a5c9f7434d857d836440dc1c3046c59b5f3.tar.gz
git-66c75a5c9f7434d857d836440dc1c3046c59b5f3.tar.bz2
git-gui: Localize commit/author dates when displaying them
Currently the Git plumbing is not localized so it does not know how to output weekday and month names that conform to the user's locale preferences. This doesn't fit with the rest of git-gui's UI as some of our dates are formatted in Tcl and some are just read from the Git plumbing so dates aren't consistently presented. Since git-for-each-ref is presenting us formatted dates and it offers no way to change that setting even in git 1.5.3.1 we need to first do a parse of the text strings it produces, correct for timezones, then reformat the timestamp using Tcl's formatting routines. Not exactly what I wanted to do but it gets us consistently presented date strings in areas like the blame viewer and the revision picker mega-widget's tooltips. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/choose_rev.tcl')
-rw-r--r--lib/choose_rev.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl
index 8c78b4d..a6a442a 100644
--- a/lib/choose_rev.tcl
+++ b/lib/choose_rev.tcl
@@ -133,13 +133,13 @@ constructor _new {path unmerged_only title} {
append fmt { %(objecttype)}
append fmt { %(objectname)}
append fmt { [concat %(taggername) %(authorname)]}
- append fmt { [concat %(taggerdate) %(authordate)]}
+ append fmt { [reformat_date [concat %(taggerdate) %(authordate)]]}
append fmt { %(subject)}
append fmt {] [list}
append fmt { %(*objecttype)}
append fmt { %(*objectname)}
append fmt { %(*authorname)}
- append fmt { %(*authordate)}
+ append fmt { [reformat_date %(*authordate)]}
append fmt { %(*subject)}
append fmt {]}
set all_refn [list]
@@ -583,7 +583,7 @@ method _reflog_last {name} {
}
if {$last ne {}} {
- set last [clock format $last -format {%a %b %e %H:%M:%S %Y}]
+ set last [format_date $last]
}
set reflog_last($name) $last
return $last