Project

General

Profile

Actions

Defect #4115

closed

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

Added by Marc Mengel about 15 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2009-10-26
Due date:
% Done:

50%

Estimated time:
Resolution:
Duplicate
Affected version:

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

Related to Redmine - Defect #3761: Most recent CVS revisions are missing in "revisions" viewClosedToshi MARUYAMA2009-08-19

Actions
Actions #1

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

Actions #2

Updated by Shawn Nock about 15 years ago

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

Actions #3

Updated by Shawn Nock about 15 years ago

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

Actions #4

Updated by Jean-Philippe Lang about 15 years ago

  • Category set to SCM
Actions #5

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
Actions #6

Updated by Toshi MARUYAMA about 14 years ago

  • % Done changed from 0 to 50

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

Actions #7

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.

Actions #8

Updated by Toshi MARUYAMA over 13 years ago

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

Actions

Also available in: Atom PDF