Project

General

Profile

Actions

Defect #5151

closed

There is an error in the age calculation for git repositories

Added by Jens Fahnenbruck about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-03-22
Due date:
% Done:

100%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

The time ago of a git commit is decreasing within the first hour or so.
It starts with "about 1 hour ago" and then decreases.

The screenshots were taken 5 minutes apart, the discrepancy is marked in the second screenshot. There you can see that the last commit (marked red) has an age of "about 1 hour ago" and the commit 19 minutes before that (marked green) is 32 minutes old, 5 minutes earlier it was 37 minutes old (see first screenshot)


Files

100322-2008331.png (125 KB) 100322-2008331.png First Screenshot! Really! Jens Fahnenbruck, 2010-03-22 20:26
100322-2013011.png (137 KB) 100322-2013011.png Second Screenshot and the time ago of commit is decreasing Jens Fahnenbruck, 2010-03-22 20:26
Actions #1

Updated by Jens Fahnenbruck about 15 years ago

now with the summer time the difference is two hours but on my local machine I get:

$ date
Mi  7 Apr 2010 00:51:19 CEST

on server I get:

$ date
Wed Apr  7 00:51:27 CEST 2010

except for the language and the seconds it is the same time. but on redmine says the commit is 2 hours from now

Actions #2

Updated by Jens Fahnenbruck about 15 years ago

I have now found the Problem:

the date string deliverd by git looks like this: "Wed Apr 7 00:50:16 2010 +0200"

in app/views/repositories/_dir_list_content.rhtml:21

distance_of_time_in_words(entry.lastrev.time,Time.now)

entry.lastrev.time = "Wed Apr 7 00:50:16 2010 +0200"

This code class String#to_time on "Wed Apr 07 00:50:16 UTC 2010", but it returns "Wed Apr 07 00:50:16 UTC 2010"

Actions #3

Updated by Toshi MARUYAMA over 14 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

This issue is duplicated with #6346 and fixed by r4187.

Actions #4

Updated by Felix Schäfer over 14 years ago

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

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

Thanks for spotting the duplicates, Toshi.

Actions

Also available in: Atom PDF