Defect #4115

repositories/show/project-name Ages off by timezone delta

Added by Marc Mengel about 12 years ago. Updated over 10 years ago.

Status:ClosedStart date:2009-10-26
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution:Duplicate Affected version:0.8.4


In our redmine 0.8.4 installation, when you go to the
repositories/show/project-name page, the Age column shows
a delta-time value which is off by the timezone delta from GMT.
(in our case currently 5 hours -- that is a change made
a minute ago lists as 5 hours ago).

If you click on the revision next to that Age entry, on the
revision page /repositories/revision/project-name/revisionkey
the correct delta time is shown, so this is restricted to just
that repositories/show/project-name page. This happens both
in Git and CVS repositories, and so appears not to be a bug
in the backends.

Related issues

Related to Redmine - Defect #3761: Most recent CVS revisions are missing in "revisions" view Closed 2009-08-19


#1 Updated by Marc Mengel about 12 years ago

I wanted to note that this doesn't change when I change my timezone as a user, the offset remains...
I should also mention that this is 0.8.4 plus:

#2 Updated by Shawn Nock about 12 years ago

Confirming this bug at my site. Same symptoms... age off by delta from UTC.

#3 Updated by Shawn Nock about 12 years ago

Adding that I am running HEAD current to a few hours ago...

#4 Updated by Jean-Philippe Lang about 12 years ago

  • Category set to SCM

#5 Updated by Chris Suter almost 12 years ago

Subject: [PATCH] Fixed timezone issue with last revision

lib/redmine/scm/adapters/git_adapter.rb | 4 +--
1 files changed, 2 insertions(
), 2 deletions(-)

diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 14e1674..928ae1c 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@ -85,7 +85,7 @ module Redmine

def lastrev(path,rev)
return nil if path.nil?
- cmd = "#{GIT_BIN} --git-dir #{target('')} log --pretty=fuller --no-merges n 1 "
+ cmd = "#{GIT_BIN} --git-dir #{target('')} log --pretty=fuller --no-merges -n 1 --date=iso"
cmd << " #{shell_quote rev} " if rev
cmd << "-
#{path} " unless path.empty?
shellout(cmd) do |io|
@ -93,7 +93,7 @ module Redmine
id = io.gets.split[1]
author = io.gets.match('Author:\s+(.*)$')[1]
2.times { io.gets }
- time = io.gets.match('CommitDate:\s+(.*)$')[1]
+ time = Time.parse(io.gets.match('CommitDate:\s+(.*)$')[1]){
:identifier => id,

#6 Updated by Toshi MARUYAMA about 11 years ago

  • % Done changed from 0 to 50

Git problem is reported at #6346 and fixed by r4187.

#7 Updated by Felix Schäfer about 11 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

This should be fixed, please open a new issue if this problem still persists.

#8 Updated by Toshi MARUYAMA over 10 years ago

I confirmed CVS has this problem. I create new issue #7827.

Also available in: Atom PDF