From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <80633e2d04092101557fd556a2@mail.gmail.com> Date: Tue, 21 Sep 2004 10:55:01 +0200 From: Christian Grothaus To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> In-Reply-To: <80633e2d0409201234781e65e6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <80633e2d0409201234781e65e6@mail.gmail.com> Subject: [9fans] Re: jet-lagged fossil Topicbox-Message-UUID: e5d6398e-eacd-11e9-9e20-41e7f4b1d025 I should have looked in the archives more thoroughly: The problem with automatic snapshots has been reported before, and a possible workaround is setting the timezone to 'GMT 0'. I found out that it also works in any timezone, when the real time clock is set to GMT and timesync is run without the 'L' flag. (Then, of course, Windows doesn't get the time correctly, but never mind. I prefer this solution at the moment.) But I really don't understand at the moment, why it doesn't work. Here is the beginning of the snapEvent() function in /sys/src/cmd/fossil/fs.c: ----------------------------------------------------------- static void snapEvent(void *v) { Snap *s; u32int now, min; Tm tm; int need; s = v; now = time(0)/60; vtLock(s->lk); /* * Snapshots happen every snapMinutes minutes. * If we miss a snapshot (for example, because we * were down), we wait for the next one. */ if(s->snapMinutes != ~0 && s->snapMinutes != 0 && now%s->snapMinutes==0 && now != s->lastSnap){ if(!fsSnapshot(s->fs, nil, nil, 0)) fprint(2, "fsSnapshot snap: %R\n"); s->lastSnap = now; } . . . ----------------------------------------------------------- So the setting of the timezone should have no influence on periodic non-archival snapshots, since the time is computed with time()?! Christian