Time in Git changelog
Added by Anonymous almost 15 years ago
Hey everyone,
I have searched these forums, the FAQ and the HowTos, but could not solve my issue. The problem is that the timezone offset seems to be applied twice to the times of my git commits. Using git log on both my client and my server I can verify the a commit is correctly timed to have happened at for example 10:00 am (-7:00). In redmine, however, The commit time will be 3:00 am, so the 7 hours offset seem to be applied twice. Any ideas on how I can fix this?
Cheers
Ole
Replies (2)
RE: Time in Git changelog - Added by Anonymous almost 15 years ago
Okay, I have tried to look into the source code and found that redmine calls
git log --raw --date=iso --pretty=fuller
and then parses the line with the Commit Time and throws it into Time.parse. If I try to do the same thing manually, I first get the line
CommitDate: 2010-01-13 00:53:09 -0700
Redmine on the other hand tells me the date for the same commit is 12.01.10 18:37, so it obviously subtracts the 7 again.
When i start irb and type
Time.parse("2010-01-13 00:53:09 -0700")
I get a
NoMethodError
. I am not really a ruby programmer, so I don't know what I am doing wrong here - any pointers?RE: Time in Git changelog - Added by Anonymous almost 15 years ago
Okay, I have a solution. I commented out use utc in environment.rb. Now all the revisions are correct, all old forum posts and issues are 7 hours ahead, but any new stuff is also correct. Thats good enough.