[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Is it okay to reset the clock on a Subversion server?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Sat, 25 Oct 2008 20:19:29 -0500

On Oct 25, 2008, at 18:05, Paul Keating wrote:

> The system clock on my Subversion server is 1 hour fast. It's not a
> DST
> thing, the clock is genuinely wrong.
>
> I think the original administrator may have done this deliberately
> because
> he did not like the fact that Subversion's timestamps are in GMT.
>
> Whatever. I now want to fix it.
>
> Only problem is, I can think of several bad things that might
> happen if I
> set the clock back by an hour. Can anyone tell me if it is safe to
> do this,
> or if the worst I can expect isn't too bad?
>
> For instance, if Subversion won't accept checkins until the time on
> the
> wall-clock is later than the timestamp on the head revision, then
> that is
> pretty harmless, I just have to do it in quiet time.

Subversion will not prevent commits. But, your commits might then not
all be in chronological order. If that happens, you can never rely on
the "-r{date}" syntax for locating revisions by date. So if you ever
want to use that syntax, you should ensure that your revisions remain
in chronological order, e.g. by switching the server's clock at a
time when nobody will commit. Disable commits to the repository
during this time to be absolutely sure, e.g. install a "start-commit"
hook that prints a message explaining the situation and exits with a
nonzero code. Remove the hook again once the server's clock has
caught up to where it was before you changed it (or at least caught
up to the time of the last revision in the repository).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-26 02:20:01 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.