{"thread":{"id":"12328","subject":"git-svn messing with timezones","startedAt":"2008-02-26T12:47:48Z","lastAt":"2008-02-27T23:23:32Z","messageCount":11,"participants":["Tim Stoakes","Eric Wong","Johannes Schindelin","Miklos Vajna","Seth Falcon","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"69989","messageId":"20080226124748.GH31792@mail.stoakes.net","threadId":"12328","inReplyTo":null,"subject":"git-svn messing with timezones","fromName":"Tim Stoakes","fromEmail":"tim@stoakes.net","sentAt":"2008-02-26T12:47:48Z","receivedAt":"2008-02-26T12:47:48Z","isPatch":false,"sender":{"key":"tim@stoakes.net","avatar":null},"body":"Hi all,\n\nWhen I commit to git, the log shows the correct timezone:\n  Date:   Tue Feb 26 23:10:24 2008 +1030\n\nHowever, when I then dcommit this to SVN with git-svn, the timezone gets\nmangled. If I now 'git log', the same commit shows\n  Date:   Tue Feb 26 12:40:24 2008 +0000\n\nThe 'svn log' of that same revision shows the correct timezone:\nr151 | foo | 2008-02-26 23:10:24 +1030 (Tue, 26 Feb 2008) | 2 lines\nso, I know it's git-svn doing it, not svn itself.\n\nThe same mangling has happened to commits that came through the original\ngit-svn import, and subsequent 'git-svn rebase's.\n\nI've tried things like:\n$ TZ=Australia/Adelaide git svn dcommit\nall end in the same result - UTC appears in the logs.\n\nI'm using:\ngit version 1.5.4.3\n\nCan anyone help?\nThanks\nTim\n\n-- \nTim Stoakes\n"},{"id":"70063","messageId":"20080227073244.GB24316@soma","threadId":"12328","inReplyTo":"20080226124748.GH31792@mail.stoakes.net","subject":"Re: git-svn messing with timezones","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-02-27T07:32:44Z","receivedAt":"2008-02-27T07:32:44Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Tim Stoakes <tim@stoakes.net> wrote:\n> Hi all,\n> \n> When I commit to git, the log shows the correct timezone:\n>   Date:   Tue Feb 26 23:10:24 2008 +1030\n> \n> However, when I then dcommit this to SVN with git-svn, the timezone gets\n> mangled. If I now 'git log', the same commit shows\n>   Date:   Tue Feb 26 12:40:24 2008 +0000\n> \n> The 'svn log' of that same revision shows the correct timezone:\n> r151 | foo | 2008-02-26 23:10:24 +1030 (Tue, 26 Feb 2008) | 2 lines\n> so, I know it's git-svn doing it, not svn itself.\n> \n> The same mangling has happened to commits that came through the original\n> git-svn import, and subsequent 'git-svn rebase's.\n> \n> I've tried things like:\n> $ TZ=Australia/Adelaide git svn dcommit\n> all end in the same result - UTC appears in the logs.\n> \n> I'm using:\n> git version 1.5.4.3\n> \n> Can anyone help?\n\nHi Tim,\n\nThis is actually the intended behavior of git-svn.\n\nSVN itself only stores times in UTC and nothing else.  The SVN\nrepository itself has no timezone information (unless the server it was\non is misconfigured :)\n\nThe regular svn client converts the UTC time to the local time (or\nbased on the TZ= environment).  Using \"git svn log\" should mimic the\ntimezone behavior of the regular svn client.\n\ngit-svn will only import times as UTC because that's what SVN\ngives it.\n\nAs a side effect, this also makes it easier for multiple users to\nindependently create repositories that result in the same commit SHA1s\n(and one of the reasons for using dcommit over git svn set-tree).\n\n-- \nEric Wong\n"},{"id":"70076","messageId":"20080227102631.GJ30300@mail.stoakes.net","threadId":"12328","inReplyTo":"20080227073244.GB24316@soma","subject":"Re: git-svn messing with timezones","fromName":"Tim Stoakes","fromEmail":"tim@stoakes.net","sentAt":"2008-02-27T10:26:31Z","receivedAt":"2008-02-27T10:26:31Z","isPatch":false,"sender":{"key":"tim@stoakes.net","avatar":null},"body":"Eric Wong(normalperson@yhbt.net)@260208-23:32:\n> The regular svn client converts the UTC time to the local time (or\n> based on the TZ= environment).  Using \"git svn log\" should mimic the\n> timezone behavior of the regular svn client.\n\nAh indeed, `git-svn log` does show the correct TZ. How annoying!\n\nMy workflow is to work with native git as much as possible, and interact\nwith svn as little as is required. This means I have to remember to run\none command to see sane logs of git commits that happen to also be svn\ncommits, and another one for the normal git commits. There is no\ntransparency here.\n\nThanks for clearing that up though Eric. Is it documented anywhere?\n\nTim\n\n-- \nTim Stoakes\n"},{"id":"70077","messageId":"alpine.LSU.1.00.0802271039220.22527@racer.site","threadId":"12328","inReplyTo":"20080227102631.GJ30300@mail.stoakes.net","subject":"Re: git-svn messing with timezones","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T10:40:37Z","receivedAt":"2008-02-27T10:40:37Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Tim Stoakes wrote:\n\n> Ah indeed, `git-svn log` does show the correct TZ. How annoying!\n\nNote: if all you want is such a strange behaviour as svn's (I mean, why \ndoes it insist to show the dates as if they were done in _your_ \ntimezone?):\n\n\tgit log --date=local\n\n> Is it documented anywhere?\n\nAFAICT it waits to be written.  By you.\n\nCiao,\nDscho\n"},{"id":"70080","messageId":"20080227122929.GS31441@genesis.frugalware.org","threadId":"12328","inReplyTo":"alpine.LSU.1.00.0802271039220.22527@racer.site","subject":"[PATCH] Documentation/git svn log: add a note about timezones.","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-27T12:29:29Z","receivedAt":"2008-02-27T12:29:29Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"git svn log mimics the timezone converting behaviour of svn log, but this was\nundocumented.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nOn Wed, Feb 27, 2008 at 10:40:37AM +0000, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Note: if all you want is such a strange behaviour as svn's (I mean, why\n> does it insist to show the dates as if they were done in _your_\n> timezone?):\n>\n>       git log --date=local\n>\n> > Is it documented anywhere?\n>\n> AFAICT it waits to be written.  By you.\n\nsomething like this?\n\n\n Documentation/git-svn.txt |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 340f1be..e1babf3 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -160,6 +160,10 @@ New features:\n --\n +\n Any other arguments are passed directly to `git log'\n++\n+NOTE: SVN itself only stores times in UTC and nothing else. The regular svn\n+client converts the UTC time to the local time (or based on the TZ=\n+environment). This command has the same behaviour.\n \n 'blame'::\n        Show what revision and author last modified each line of a file. This is\n-- \n1.5.4\n"},{"id":"70081","messageId":"alpine.LSU.1.00.0802271231080.22527@racer.site","threadId":"12328","inReplyTo":"20080227122929.GS31441@genesis.frugalware.org","subject":"Re: [PATCH] Documentation/git svn log: add a note about timezones.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T12:33:22Z","receivedAt":"2008-02-27T12:33:22Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Miklos Vajna wrote:\n\n> git svn log mimics the timezone converting behaviour of svn log, but this was\n\nThis line is definitely too long.  Please make commit messages readable on \nan 80-character display with a 4-character indent, i.e. 76 \ncharacters/line.\n\n> On Wed, Feb 27, 2008 at 10:40:37AM +0000, Johannes Schindelin \n> <Johannes.Schindelin@gmx.de> wrote:\n> > Note: if all you want is such a strange behaviour as svn's (I mean, \n> > why does it insist to show the dates as if they were done in _your_ \n> > timezone?):\n> >\n> >       git log --date=local\n> >\n> > > Is it documented anywhere?\n> >\n> > AFAICT it waits to be written.  By you.\n> \n> something like this?\n\nYes, very nice.  Although I find it sad that an opportunity was lost for a \ncomplainer to make good.\n\n> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\n> index 340f1be..e1babf3 100644\n> --- a/Documentation/git-svn.txt\n> +++ b/Documentation/git-svn.txt\n> @@ -160,6 +160,10 @@ New features:\n>  --\n>  +\n>  Any other arguments are passed directly to `git log'\n> ++\n> +NOTE: SVN itself only stores times in UTC and nothing else. The regular svn\n> +client converts the UTC time to the local time (or based on the TZ=\n> +environment). This command has the same behaviour.\n>  \n>  'blame'::\n>         Show what revision and author last modified each line of a file. This is\n\nI think that this note should come before the \"Any other arguments\" line.\n\nCiao,\nDscho\n"},{"id":"70083","messageId":"20080227131300.GT31441@genesis.frugalware.org","threadId":"12328","inReplyTo":"alpine.LSU.1.00.0802271231080.22527@racer.site","subject":"[PATCH] Documentation/git svn log: add a note about timezones.","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-02-27T13:13:00Z","receivedAt":"2008-02-27T13:13:00Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"git svn log mimics the timezone converting behaviour of svn log, but\nthis was undocumented.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nOn Wed, Feb 27, 2008 at 12:33:22PM +0000, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > git svn log mimics the timezone converting behaviour of svn log, but this was\n>\n> This line is definitely too long.  Please make commit messages readable on\n> an 80-character display with a 4-character indent, i.e. 76\n> characters/line.\n\nright, corrected.\n\n> Yes, very nice.  Although I find it sad that an opportunity was lost for a\n> complainer to make good.\n\noops :(\n\n> > ++\n> > +NOTE: SVN itself only stores times in UTC and nothing else. The regular svn\n> > +client converts the UTC time to the local time (or based on the TZ=\n> > +environment). This command has the same behaviour.\n> >\n> >  'blame'::\n> >         Show what revision and author last modified each line of a file. This is\n>\n> I think that this note should come before the \"Any other arguments\" line.\n\nmoved.\n\n Documentation/git-svn.txt |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 340f1be..bec9acc 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -159,6 +159,10 @@ New features:\n \tour version of --pretty=oneline\n --\n +\n+NOTE: SVN itself only stores times in UTC and nothing else. The regular svn\n+client converts the UTC time to the local time (or based on the TZ=\n+environment). This command has the same behaviour.\n++\n Any other arguments are passed directly to `git log'\n \n 'blame'::\n-- \n1.5.4\n"},{"id":"70084","messageId":"alpine.LSU.1.00.0802271315370.22527@racer.site","threadId":"12328","inReplyTo":"20080227131300.GT31441@genesis.frugalware.org","subject":"Re: [PATCH] Documentation/git svn log: add a note about timezones.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T13:15:49Z","receivedAt":"2008-02-27T13:15:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 27 Feb 2008, Miklos Vajna wrote:\n\n> git svn log mimics the timezone converting behaviour of svn log, but\n> this was undocumented.\n\nThanks,\nDscho\n"},{"id":"70087","messageId":"m2zltmnzey.fsf@userprimary.net","threadId":"12328","inReplyTo":"20080227102631.GJ30300@mail.stoakes.net","subject":"Re: git-svn messing with timezones","fromName":"Seth Falcon","fromEmail":"seth@userprimary.net","sentAt":"2008-02-27T16:21:09Z","receivedAt":"2008-02-27T16:21:09Z","isPatch":false,"sender":{"key":"seth@userprimary.net","avatar":"https://gravatar.com/avatar/1db807504c1f8fb0a13bf1056a1e4d5096d17f3a09a1e9540f3af5f8b5ee009c?d=mp&s=160"},"body":"Tim Stoakes <tim@stoakes.net> writes:\n> Ah indeed, `git-svn log` does show the correct TZ. How annoying!\n>\n> My workflow is to work with native git as much as possible, and interact\n> with svn as little as is required. This means I have to remember to run\n> one command to see sane logs of git commits that happen to also be svn\n> commits, and another one for the normal git commits. There is no\n> transparency here.\n\nYou might find it convenient to set an alias in ~/gitconfig like:\n\n    [alias]\n            llog = log --date=local\n\nThe you can review commits in your TZ via 'git llog'.\n\n+ seth\n\n-- \nSeth Falcon | seth@userprimary.net | blog: http://userprimary.net/user/\n"},{"id":"70176","messageId":"20080227230916.GF18074@mail.stoakes.net","threadId":"12328","inReplyTo":"alpine.LSU.1.00.0802271039220.22527@racer.site","subject":"Re: git-svn messing with timezones","fromName":"Tim Stoakes","fromEmail":"tim@stoakes.net","sentAt":"2008-02-27T23:09:16Z","receivedAt":"2008-02-27T23:09:16Z","isPatch":false,"sender":{"key":"tim@stoakes.net","avatar":null},"body":"Johannes Schindelin(Johannes.Schindelin@gmx.de)@270208-10:40:\n> Note: if all you want is such a strange behaviour as svn's (I mean, why \n> does it insist to show the dates as if they were done in _your_ \n> timezone?):\n> \n> \tgit log --date=local\n\nAh excellent, that's what I want I think. I'm stuck with SVN for work,\nand reviewing commits that appeared to happen at 4am does not do much\nfor my sanity!\n\nThanks all.\n\nTim\n\n-- \nTim Stoakes\n"},{"id":"70178","messageId":"7vlk56ouff.fsf@gitster.siamese.dyndns.org","threadId":"12328","inReplyTo":"20080227230916.GF18074@mail.stoakes.net","subject":"Re: git-svn messing with timezones","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-27T23:23:32Z","receivedAt":"2008-02-27T23:23:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tim Stoakes <tim@stoakes.net> writes:\n\n> Johannes Schindelin(Johannes.Schindelin@gmx.de)@270208-10:40:\n>> Note: if all you want is such a strange behaviour as svn's (I mean, why \n>> does it insist to show the dates as if they were done in _your_ \n>> timezone?):\n>> \n>> \tgit log --date=local\n>\n> Ah excellent, that's what I want I think. I'm stuck with SVN for work,\n> and reviewing commits that appeared to happen at 4am does not do much\n> for my sanity!\n\nFYI (\"you\" not referring to Tim in particular but the list\nreaders in general), the same --date=local can be used in a\nrepository that talk with CVS.\n"}]}