From owner-freebsd-questions@FreeBSD.ORG Sat Dec 31 00:37:12 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 120D516A41F for ; Sat, 31 Dec 2005 00:37:12 +0000 (GMT) (envelope-from fbsd-questions@mawer.org) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59F7543D4C for ; Sat, 31 Dec 2005 00:37:09 +0000 (GMT) (envelope-from fbsd-questions@mawer.org) Received: from c211-30-90-140.belrs3.nsw.optusnet.com.au (c211-30-246-162.belrs3.nsw.optusnet.com.au [211.30.246.162]) by mail06.syd.optusnet.com.au (8.12.11/8.12.11) with SMTP id jBV0b89J013272 for ; Sat, 31 Dec 2005 11:37:08 +1100 Received: (qmail 88750 invoked from network); 31 Dec 2005 00:37:08 -0000 Received: from unknown (HELO ?127.0.0.1?) (unknown) by unknown with SMTP; 31 Dec 2005 00:37:08 -0000 Message-ID: <43B5D2AE.2050603@mawer.org> Date: Sat, 31 Dec 2005 11:37:02 +1100 From: Antony Mawer User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gilbert Cao References: <20051230231627.GA15040@bsdmon.com> In-Reply-To: <20051230231627.GA15040@bsdmon.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: One hour offset with smbfs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2005 00:37:12 -0000 On 31/12/2005 10:16 AM, Gilbert Cao wrote: > I just ran into a small problem with modification time with smbfs : > My smb client machine is a FreeBSD 6.0 with GMT+1. > My smb server machine is a FreeBSD 5.4 with also GMT+1. > > I have noticed a one hour offset between a file's modification time when > I `ls -l file` from the smb client machine and the same file's > modification time when I `ls -l file` from the smb server machine. > That file stands in a smb shared directory, on the smb server. > > More, I have noticed this, only for a datetime like 1st April, 2005. > For a datetime like 1st December 2005, the problem does not occur. > > For example, > from the smb client side, I see a modification time of > 2005-04-01 00:00:00, and > from the smb server side, I see a modification time of > 2005-03-31 23:00:00. > > When I do a `touch -t 200504010000.00 file` from the smb server side, > I see 2005-04-01 01:00:00, from the smb client side. > When I do a `touch -t 200504010000.00 file` from the smb client side, > I see 2005-03-31 23:00:00, from the smb server side. > > It seems that it is only a matter with summer time. > > Anyone know if something can be done about this ? > I guess the problem is on the smbfs client side ... This appears to be a problem with smbfs when dealing with timestamps in daylight savings time (or summer time, as you refer to it). I looked into it briefly, and from what I read it seems the kernel is divorced of knowing anything about daylight savings time (only a boolean value indicating whether or not it is currently daylight savings or not is maintained). This means when times from the SMB server are translated, the kernel can't adjust the date/time stamps to compensate for the DST offset, as it doesn't know what the offset is... (not everwhere uses an hour difference for DST) I'd love for someone to correct me and tell me that there's an easy way to fix this issue -- this was just my deduction after a brief look into the matter. Cheers Antony