Re: git-svn messing with timezones

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Stoakes <tim@xxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux