From owner-freebsd-chat@FreeBSD.ORG Sat Mar 24 16:04:17 2007 Return-Path: X-Original-To: freebsd-chat@FreeBSD.ORG Delivered-To: freebsd-chat@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC06D16A402 for ; Sat, 24 Mar 2007 16:04:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 3AF2313C45D for ; Sat, 24 Mar 2007 16:04:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (apqbqj@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l2OG4Ae9084284; Sat, 24 Mar 2007 17:04:15 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l2OG4AU7084283; Sat, 24 Mar 2007 17:04:10 +0100 (CET) (envelope-from olli) Date: Sat, 24 Mar 2007 17:04:10 +0100 (CET) Message-Id: <200703241604.l2OG4AU7084283@lurza.secnetix.de> From: Oliver Fromme To: freebsd-chat@FreeBSD.ORG, deeptech71@gmail.com In-Reply-To: <46042B3A.7070100@gmail.com> X-Newsgroups: list.freebsd-chat User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Sat, 24 Mar 2007 17:04:16 +0100 (CET) Cc: Subject: Re: 64bit timestamp X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-chat@FreeBSD.ORG, deeptech71@gmail.com List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2007 16:04:17 -0000 deeptech71@gmail.com wrote: > UNIX Timestamp: > 32 bits, starts from year 1970, ticks every second > capable of representing the time from 1970 to 2106 No, the UNIX time_t is a signed value, so it ranges from 1901 to 2038 when it's a 32bit int (such as on FreeBSD; Solaris has a 64bit time_t, for example): $ date -r $(( - 2 ** 31 )) Fri Dec 13 21:45:52 CET 1901 $ date -r $(( 2 ** 31 - 1 )) Tue Jan 19 04:14:07 CET 2038 (I'm using a privately patched version of /bin/sh which knows the "**" operator, among other things.) > 'til then, computers will change > sufficient for file timestamps, comparing file times FreeBSD's UFS2 already uses 96bit timestamps, where 64 bits are used for seconds and 32 bits are used for nanoseconds. Is that sufficient for you? See for the actual definitions: typedef int64_t ufs_time_t; [...] struct ufs2_dinode { [...] ufs_time_t di_atime; /* 32: Last access time. */ ufs_time_t di_mtime; /* 40: Last modified time. */ ufs_time_t di_ctime; /* 48: Last inode change time. */ ufs_time_t di_birthtime; /* 56: Inode creation time. */ int32_t di_mtimensec; /* 64: Last modified time. */ int32_t di_atimensec; /* 68: Last access time. */ int32_t di_ctimensec; /* 72: Last inode change time. */ int32_t di_birthnsec; /* 76: Inode creation time. */ [...] } Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I have stopped reading Stephen King novels. Now I just read C code instead." -- Richard A. O'Keefe