da0x / gource

Automatically exported from code.google.com/p/gource
0 stars 0 forks source link

SVN to custom log conversion Unix Dates incorrect #134

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Note that the built in conversion From SVN XML to custom log format does not 
convert to Unix dates correctly.

gource --path myProject2.xml --output-custom-log myProject2.log

Where myProject2.xml was generated with: 
SVN.exe svn log -r 1:HEAD --xml --verbose > myProject.xml

For example <date>2009-07-01T15:14:00.672931Z</date> Is converted into 
1220360620 which is Tue, 02 Sep 2008 13:03:40 GMT and is played back as such in 
Gource.

Should be 1246461241

Original issue reported on code.google.com by robert.w...@gtempaccount.com on 11 Aug 2011 at 4:02

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I wasn't able to reproduce it giving you completely the wrong date (?), but it 
does seem that I need to treat them as GMT rather than the local timezone.

Original comment by acaudw...@gmail.com on 13 Sep 2011 at 2:01

GoogleCodeExporter commented 8 years ago
I've changed it to use timegm() instead of mktime() on the development version. 
Looks like it's giving the right results now:

custom log outputs: 1246461240
which gmtime() coverts to Wed Jul  1 15:14:00 2009.

Original comment by acaudw...@gmail.com on 13 Sep 2011 at 2:35

GoogleCodeExporter commented 8 years ago
Yes it seems actually that our repo was merged together from a few other 
repo's. And this has confused Gource as the Revision numbers are sequential 
however the dates reset at a few points if you take the log in sequentially by 
revision.

I can't unfortunately attach the SVN logs for you to repro sorry.

Original comment by robert.w...@gtempaccount.com on 13 Sep 2011 at 4:29

GoogleCodeExporter commented 8 years ago
Another words: non-sequential groups of dates in revision sequential log.

Original comment by robert.w...@gtempaccount.com on 13 Sep 2011 at 4:31

GoogleCodeExporter commented 8 years ago

Original comment by acaudw...@gmail.com on 15 Sep 2011 at 6:38