From owner-freebsd-questions Thu Jun 27 9:54:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by hub.freebsd.org (Postfix) with ESMTP id 9702837B401 for ; Thu, 27 Jun 2002 09:54:01 -0700 (PDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g5RGs0h24032 for freebsd-questions@freebsd.org; Thu, 27 Jun 2002 12:54:00 -0400 (EDT) Received: from pilot05.cl.msu.edu (pilot05.cl.msu.edu [35.9.5.25]) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) with ESMTP id g5RGpoe24020 for ; Thu, 27 Jun 2002 12:51:50 -0400 (EDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by pilot05.cl.msu.edu (8.10.2/8.10.2) with ESMTP id g5RGpnF54346 for ; Thu, 27 Jun 2002 12:51:49 -0400 Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g5RGpj624016; Thu, 27 Jun 2002 12:51:45 -0400 (EDT) From: Jerry McAllister Message-Id: <200206271651.g5RGpj624016@clunix.cl.msu.edu> Subject: Re: time() To: dsyphers@uchicago.edu, freebsb-questions@freebsd.org Date: Thu, 27 Jun 2002 12:51:45 -0400 (EDT) Cc: jerrymc@msu.edu (Jerry McAllister) In-Reply-To: <200206270825.11536.dsyphers@uchicago.edu> from "David Syphers" at Jun 27, 2002 08:25:11 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > On Thursday 27 June 2002 07:49 am, Fabio Yasusi Yamamoto wrote: > > Hi > > > > When i do time(), the return value should be a UTC_time-1970year? or > local_time-1970year? > > From 'man 3 time' : > > "The time() function returns the value of time in seconds since 0 hours, 0 > minutes, 0 seconds, January 1, 1970, Coordinated Universal Time." > > > if is UTC, how can i adjust to local? If by that you mean you want to see it in more familiar format, use 'date -r LONG-UTC-NUMBER' and give it that long number of seconds for LONG-UTC-NUMBER. ////jerry > > That's what time zones are for. See timezone(3) or localtime(3). > > -David > > -- > Everyone who believes in telekinesis, raise my hand... > > Astronomy and Astrophysics Center > The University of Chicago > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message