Defect #4115
closedrepositories/show/project-name Ages off by timezone delta
50%
Description
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
Updated by Marc Mengel about 15 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:
http://www.redmine.org/projects/redmine/repository/revisions/2840/
http://www.redmine.org/issues/4003
http://www.redmine.org/issues/4002
Updated by Shawn Nock about 15 years ago
Confirming this bug at my site. Same symptoms... age off by delta from UTC.
Updated by Shawn Nock about 15 years ago
Adding that I am running HEAD current to a few hours ago...
Updated by Chris Suter almost 15 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])
Revision.new({
:identifier => id,
--
1.6.3.3
Updated by Toshi MARUYAMA about 14 years ago
- % Done changed from 0 to 50
Updated by Felix Schäfer about 14 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.
Updated by Toshi MARUYAMA over 13 years ago
I confirmed CVS has this problem. I create new issue #7827.