Issue #153 wontfix

Time-zone problem

Esben Skovenborg
created an issue

{{{

hg log -r tip changeset: 23:b2e383a1af6b tag: tip user: xxx@xxx date: Thu Jan 21 16:22:15 2010 +0000

grep b2e383a1af6b .hg\svn\rev_map 27495 b2e383a1af6be14bf313bf20be4b02764583e383

>svn log -r 27495

r27495 | xxx | 2010-01-21 17:22:15 +0100 (Thu, 21 Jan 2010) | 5 lines }}}

SVN is right - I do live in GMT+1 and so does the SVN server.

(Other than this, the hg-clone and the svn-checkout trees were identical, btw. :)

Comments (4)

  1. Augie Fackler repo owner

    (Reply via dur...@gmail.com):

    On Thu, Mar 4, 2010 at 9:33 AM, <issues-noreply@bitbucket.org> wrote:

    What does your machine think its timezone is? IIRC, we get all times from the svn server in UTC, and then commit them in UTC. If your locally-configured timezone was off, that could cause this.

  2. Anonymous

    I also have this problem, although I suppose it's not really a bug.

    The problem seems to be that Subversion saves in UTC and expects the client to convert to local time[1] while Mercurial (I think) shows whatever timezone was in the commit, which will always be UTC if it comes from Subversion. Mercurial needs to convert to local time somewhere before it's displayed.

    [1] http://svn.haxx.se/users/archive-2003-09/0322.shtml

  3. Augie Fackler repo owner

    Now that I'm taking a moment to think, there's a reason to store all times from svn in UTC: it makes changeset hashes deterministic. Otherwise, they'd depend on the user's local timezone, and that'd be undesirable.

  4. Anonymous

    I stumbled over the same problem/phenomenon. it's really a bit confusing until you note the timezone difference in the two logs (svn vs. hg). from a pure user perspective I would argue `hg log' should always respect the local time zone (or I should be configurable in hgsubversion). regarding non-deterministic hashes: the hashes would stay unique in any case, right? maybe I miss the point, but what is the problem if the hash becomes dependent on the time zone? I believe when using hgsubversion the hg repo should only pull/push against the svn server, not against any other hg repo, right? so the hashes are sort of irrelevant? or am I wrong here? anyway, thanks a lot for hgsubversion. it's great.

  5. Log in to comment