{"thread":{"id":"38827","subject":"[BUG] git svn's --localtime seems to corrupt time zones","startedAt":"2015-03-16T17:31:47Z","lastAt":"2015-03-16T17:31:47Z","messageCount":1,"participants":["Christoph Anton Mitterer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"257804","messageId":"1426527107.18487.14.camel@scientia.net","threadId":"38827","inReplyTo":null,"subject":"[BUG] git svn's --localtime seems to corrupt time zones","fromName":"Christoph Anton Mitterer","fromEmail":"calestyo@scientia.net","sentAt":"2015-03-16T17:31:47Z","receivedAt":"2015-03-16T17:31:47Z","isPatch":false,"sender":{"key":"calestyo@scientia.net","avatar":"https://gravatar.com/avatar/74cd78048081efac1fcd21e681751ed55968f949a50e33adbe1a41c572a605cd?d=mp&s=160"},"body":"Hi.\n\nI was converting some very old svn repos of mine into git using git svn,\nand since I didn't fully trust the conversion process I wrote a small\ntool which goes through all commits/revisions (there were no branches or\nnon-linear stuff involved in these svn repos) and compares the author\nnames, dates, commit messages and file tree for each revision/commit.\n\nI used something like:\ngit svn clone --trunk=/ --no-metadata --localtime --preserve-empty-dirs\n--authors-file=~/authors.txt file:///...\n\nand used --localtime since I wanted the times/dates with the original\ntime zones (just as it seems to happen with a normal git repo as well).\n\nThe svn repo contained commits with different time zones (mostly because\nof daylight saving times).\n\n\nWith the diff tool I've noticed the following behaviour:\nApparently, whenever --localtime is given, git svn takes SVN's time as\nis, completely ignoring it's time zone, storing *everything* in the\ncurrent(!) local time zone.\n\nThis has IMHO two bugs:\n1) it doesn't do what one expects and what the manpage promises:\n> --localtime\n> Store Git commit times in the local time zone instead of UTC.\n> This makes git log (even without --date=local) show the same\n> times that svn log would in the local time zone.\n\n=> This isn't true, cause while svn log shows the differing time zones\n(in my case +0100 and +0200 when the DST changes), git log shows\neverything in +0100.\n\n2) but even worse, as said above, it seems to ignore the time zones from\nSVN, so when I'm currently in +0100, all the svn times from +0100 will\nbe correct, but all the ones that were stored in +0200 (or anything\nelse) will have exactly the same time value just the zone changed to\n+0100, thereby corrupting the time.\n\nExample svn log output:\n$ svn log | grep ^r | head -n 4\nr781 | calestyo | 2008-08-12 23:26:12 +0200 (Tue, 12 Aug 2008) | 2 lines\nr780 | calestyo | 2008-01-11 01:16:59 +0100 (Fri, 11 Jan 2008) | 2 lines\nr779 | calestyo | 2008-01-06 19:43:08 +0100 (Sun, 06 Jan 2008) | 2 lines\nr778 | calestyo | 2008-01-06 18:51:37 +0100 (Sun, 06 Jan 2008) | 2 lines\n\nAnd from the corresponding \"converted\" git repo:\n$ git log --date=iso8601 | grep ^Date: | head -n 4\nDate:   2008-08-12 23:26:12 +0100\nDate:   2008-01-11 01:16:59 +0100\nDate:   2008-01-06 19:43:08 +0100\nDate:   2008-01-06 18:51:37 +0100\n\n\nAll packages from Debian sid, i.e. git 2.1.4 and subversion 1.8.10.\n\n\nAny ideas?\n\nCheers,\nChris.\n"}]}