git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Tim Stoakes <tim@stoakes.net>
Cc: git@vger.kernel.org
Subject: Re: git-svn messing with timezones
Date: Tue, 26 Feb 2008 23:32:44 -0800	[thread overview]
Message-ID: <20080227073244.GB24316@soma> (raw)
In-Reply-To: <20080226124748.GH31792@mail.stoakes.net>

Tim Stoakes <tim@stoakes.net> wrote:
> Hi all,
> 
> When I commit to git, the log shows the correct timezone:
>   Date:   Tue Feb 26 23:10:24 2008 +1030
> 
> However, when I then dcommit this to SVN with git-svn, the timezone gets
> mangled. If I now 'git log', the same commit shows
>   Date:   Tue Feb 26 12:40:24 2008 +0000
> 
> The 'svn log' of that same revision shows the correct timezone:
> r151 | foo | 2008-02-26 23:10:24 +1030 (Tue, 26 Feb 2008) | 2 lines
> so, I know it's git-svn doing it, not svn itself.
> 
> The same mangling has happened to commits that came through the original
> git-svn import, and subsequent 'git-svn rebase's.
> 
> I've tried things like:
> $ TZ=Australia/Adelaide git svn dcommit
> all end in the same result - UTC appears in the logs.
> 
> I'm using:
> git version 1.5.4.3
> 
> Can anyone help?

Hi Tim,

This is actually the intended behavior of git-svn.

SVN itself only stores times in UTC and nothing else.  The SVN
repository itself has no timezone information (unless the server it was
on is misconfigured :)

The regular svn client converts the UTC time to the local time (or
based on the TZ= environment).  Using "git svn log" should mimic the
timezone behavior of the regular svn client.

git-svn will only import times as UTC because that's what SVN
gives it.

As a side effect, this also makes it easier for multiple users to
independently create repositories that result in the same commit SHA1s
(and one of the reasons for using dcommit over git svn set-tree).

-- 
Eric Wong

  reply	other threads:[~2008-02-27  7:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 12:47 git-svn messing with timezones Tim Stoakes
2008-02-27  7:32 ` Eric Wong [this message]
2008-02-27 10:26   ` Tim Stoakes
2008-02-27 10:40     ` Johannes Schindelin
2008-02-27 12:29       ` [PATCH] Documentation/git svn log: add a note about timezones Miklos Vajna
2008-02-27 12:33         ` Johannes Schindelin
2008-02-27 13:13           ` Miklos Vajna
2008-02-27 13:15             ` Johannes Schindelin
2008-02-27 23:09       ` git-svn messing with timezones Tim Stoakes
2008-02-27 23:23         ` Junio C Hamano
2008-02-27 16:21     ` Seth Falcon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080227073244.GB24316@soma \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=tim@stoakes.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).