From owner-cvs-all@FreeBSD.ORG Tue Apr 10 04:21:34 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54CF416A402; Tue, 10 Apr 2007 04:21:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E59FD13C43E; Tue, 10 Apr 2007 04:21:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.8/8.13.4) with ESMTP id l3A4K1Cx066455; Mon, 9 Apr 2007 22:20:01 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 09 Apr 2007 22:20:11 -0600 (MDT) Message-Id: <20070409.222011.1689682576.imp@bsdimp.com> To: grog@freebsd.org From: "M. Warner Losh" In-Reply-To: <20070410010510.GB61460@wantadilla.lemis.com> References: <20070409021942.C150B16A529@hub.freebsd.org> <20070409024826.553be564@dev.lan.Awfulhak.org> <20070410010510.GB61460@wantadilla.lemis.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 09 Apr 2007 22:20:01 -0600 (MDT) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, brian@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.bin/touch touch.1 touch.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2007 04:21:34 -0000 In message: <20070410010510.GB61460@wantadilla.lemis.com> "Greg 'groggy' Lehey" writes: : On Monday, 9 April 2007 at 2:48:26 -0700, Brian Somers wrote: : > On Mon, 9 Apr 2007 02:19:42 +0000 (UTC) Greg Lehey wrote: : >> grog 2007-04-09 02:19:37 UTC : >> : >> FreeBSD src repository : >> : >> Modified files: : >> usr.bin/touch touch.1 touch.c : >> Log: : >> Add -A flag to adjust existing time stamps. : >> diff -u src/usr.bin/touch/touch.1:1.14 src/usr.bin/touch/touch.1:1.15 : >> --- src/usr.bin/touch/touch.1:1.14 Sun Feb 13 22:25:24 2005 : >> +++ src/usr.bin/touch/touch.1 Mon Apr 9 02:19:37 2007 : >> +.It Fl A : >> +Adjust the access and modification time stamps for the file by the : >> +specified value. : >> +This flag is intended for use in modifying files with a time stamp : >> +relative to an incorrect time zone. : > : > I don't understand what this means. File times are in UTC aren't : > they? : : No, they're in time_t. But if you import files from other systems, : you frequently get times which are off by some time zone offset. time_t is UTC, by definition (sadly, POSIX has enshrined a broken definition of UTC as the time_t definition, but that's not important right now). It cannot be a localtime. Localtime conversion of time_t is done by libc to print the local time. : The case in point is that when importing files from digital cameras, : it's frequently impossible to get the correct time. Many cameras are : too stupid to handle time zones at all and assume it's UTC. Those : that can make a typically US assumption that all time zones are on the : hour. Here in South Australia, for example, we have a time zone : offset of +0930, which seems to blow the minds of most cameras. In my : case, I have a Canon that fits the first category, and a Nikon that : fits the second. FAT doesn't deal in time_t. It deals in 'local time' only, encoded in a funky way. The rest of what you say is correct, but since there is much confusion around time_t I thought I'd be pedantic. Warner