From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: timestamp Date: Sat, 12 Feb 2022 14:38:58 +0200 Message-ID: <835ypks1i5.fsf@gnu.org> References: <5cae853e6252bb3e38b1a20ff9ea960c1756c68c.camel@riseup.net> <9d45b2d6c007a8e9ca1e0656deed190f1181e035.camel@planete-kraus.eu> <098bbd5f1c81414521015479b7e2b17d8809f1bd.camel@riseup.net> <874k54tia0.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: Ricardo Wurmus Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Feb 12 13:41:39 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIrid-00091n-7J for guile-user@m.gmane-mx.org; Sat, 12 Feb 2022 13:41:39 +0100 Original-Received: from localhost ([::1]:44742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIria-0007Rs-MT for guile-user@m.gmane-mx.org; Sat, 12 Feb 2022 07:41:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIrgf-0007Qf-3E for guile-user@gnu.org; Sat, 12 Feb 2022 07:39:39 -0500 Original-Received: from [2001:470:142:3::e] (port=38790 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIrgK-000546-Kx; Sat, 12 Feb 2022 07:39:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=jopgIk/GG7pCbIUW43kwRcepYYiZsCeJPlfo9YvhpCA=; b=EVpFMIiKWR8X0tRWx7MG +v7+E+yuuryVV+wA+OaYraEeo53/EgRYGu9f9oMa/P8qNByAtEcoXoyHS8pWh5aAMaAA+m2iKrnEq qTtptGyOpljxusvxeXyvyaI2pAAfCeC/ipoK0Baay2M+jWpBbEA+AQhHV/2AX1aCosHvGC+eYjrIG nq59uTshAxBVFbgUleLBrKgG/A+AkqcV63SCVyDZcWljzUJFHCVdfEYEBLPTTg4Pm5EJiIL22cpFV frFbQ/AkAgZ+LdcpSsEp9GQz54VgN6YXLb4jJUBM7De70EcBxebWCMXAKEx/v4vrkUw7iS0PAEpsK /+y32l1uniuWjw==; Original-Received: from [87.69.77.57] (port=4594 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIrg8-0002ac-2T; Sat, 12 Feb 2022 07:39:16 -0500 In-Reply-To: <874k54tia0.fsf@elephly.net> (message from Ricardo Wurmus on Sat, 12 Feb 2022 12:49:10 +0100) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18084 Archived-At: > From: Ricardo Wurmus > Date: Sat, 12 Feb 2022 12:49:10 +0100 > Cc: guile-user@gnu.org > > > Hi adriano, > > I’ve got no good answers as to “why” things are the way they are, but > the manual explains the range of these values: > > > It seesm to be > > > > (tm:mon %3) > > > > This returns > > > > 11 > > > > I expected 12 but ok, I recognize this kind of weirdness > > -- Scheme Procedure: tm:mon tm > -- Scheme Procedure: set-tm:mon tm val > Month (0-11). > > > I'm unhappy with > > > > (tm:year $3) > > > > This returns > > > > 120 > > > > it's 2020 > > > > Why would 120 represent 2020 ? > > -- Scheme Procedure: tm:year tm > -- Scheme Procedure: set-tm:year tm val > Year (70-), the year minus 1900. > > I don’t know why this would be useful, but that’s what it is ¯\_(ツ)_/¯ It is simply how the C function 'localtime' returns its data, basically for historical reasons. Guile hands it to the application without any changes.