From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: encode-time vs decode-time Date: Wed, 31 Jul 2019 15:31:20 -0400 Message-ID: References: <502b23f8-58ed-38ff-ae50-fae391129a10@cs.ucla.edu> <87v9viuivo.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="157550"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Paul Eggert , Andy Moreton , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 31 21:31:58 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsuKJ-000epL-C1 for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 21:31:55 +0200 Original-Received: from localhost ([::1]:43924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsuKI-0006La-Cl for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 15:31:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41700) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsuJs-0006K4-AJ for emacs-devel@gnu.org; Wed, 31 Jul 2019 15:31:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsuJq-0005vs-Li for emacs-devel@gnu.org; Wed, 31 Jul 2019 15:31:28 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25791) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsuJq-0005s8-Dm for emacs-devel@gnu.org; Wed, 31 Jul 2019 15:31:26 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BF482445A46; Wed, 31 Jul 2019 15:31:22 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 94E7A445A44; Wed, 31 Jul 2019 15:31:21 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1564601481; bh=v/2ufCDVgSl/frrgPrYaM5JbV258V2buo+93ZfQFNG8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=S/XnKUXiestrHBtvF9kMGFeSoLEkITXhRjXD3crg1nR2nR2LpUpm32CXpnGX5fvDn 8cWKEAeZLE+4BvyvusYLoOnMUOI8il9hJjwTDuUGYd6QctIRW76DjuPEwLSMMCEqMo b8bjIpRov3zf27pz5A5N9ZDstbmGKpom8Bmhfp6wZ+t0XaG7I5Zk0gjZVOxv1S7Qci Cn3unIhM7XSI0bDGisYvPP1wPNPYIhbelnrvQSK1ipS6WGKrt/oxkPd8UoGQ6UgO2P OhahcwsQnr2rgElHN8wgoprsrHYheGvKg6/XXbK9/Yn+zyualq07AP4Vkvk3o7jQxP oFTz+16dmpkmw== Original-Received: from alfajor (104-195-212-167.cpe.teksavvy.com [104.195.212.167]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5A335120F90; Wed, 31 Jul 2019 15:31:21 -0400 (EDT) In-Reply-To: <87v9viuivo.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 31 Jul 2019 21:03:07 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239058 Archived-At: > So I think the things up above there should really be calls to a new > function `get-current-time', that returns the same thing as > `(encode-time nil 'integer)'. It should default to `integer', but can > have an optional argument that says what form of "internal second time > format" to return (i.e., `list', `t'). I tend to agree. Also I think we should try and standardize the representation of "internal second time" (presumably using the rational (NUM . DENOM) representation). So I think `get-current-time` should just always return this representation, and those who need another will just have to call `convert-time-format` explicitly. Stefan