From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: encode-time vs decode-time Date: Tue, 30 Jul 2019 12:32:34 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194462"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 30 12:33:02 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 1hsPRE-000oNi-Av for ged-emacs-devel@m.gmane.org; Tue, 30 Jul 2019 12:33:00 +0200 Original-Received: from localhost ([::1]:59520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsPRD-0003Pi-1O for ged-emacs-devel@m.gmane.org; Tue, 30 Jul 2019 06:32:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43510) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsPQu-0003PV-Oo for emacs-devel@gnu.org; Tue, 30 Jul 2019 06:32:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsPQt-0006ly-Jp for emacs-devel@gnu.org; Tue, 30 Jul 2019 06:32:40 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:53438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsPQt-0006kR-Dq for emacs-devel@gnu.org; Tue, 30 Jul 2019 06:32:39 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hsPQo-0006kP-7t; Tue, 30 Jul 2019 12:32:36 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEX8+/fMx8H7+PL9/fr8 +vXtTQGyAAACQklEQVQ4jV1Ui5UkIQhklAT0NgBlCMA3dgCsTf4xXaEzu/fON59uCgqkUHLiHB/L lOec8d2LFjuMg5j+A6zZuHJYaI48h/1EiN90h6fHO48P8LyJxgCQCa/D7jcZOYUhwHhAumMfJJ9H WjR+c0+STT3LXvN3kdIVdX4AFP4D2Jg0RLqIoKr1AXwZN5ITYTkJ740CEPEF56byUqak+gaSu4mK BEjmiPjkUDUO69I2BiP0nyZmvItmc6SQn6oMfU1LlKTJhf/fljDb1YIMdMPl+Wk7u+sEE3zJQPUc b0Dtu8zUKN/qyRiSHIBlldIEhL7ZnvOVkeaipr30LxHDNiPRnWlsHUS+SxEpX1FZM8deCCEMoO82 KZiWJzh57OQCcBoIqytX7r5C3VcAdUeYq/S6ytfe43WAXqqob85+AGguDrdS1+q7iBIVYg4CCM8q rSIuXEQY+gbVYycnAKVXRCECQwXuh9TYyy6uBh8aaxgfe/wRpJdSj/ChM0Lktt54gn8XVStyiKdo CXfImQ5XlQ2IDloaG6ynYQDK7rFCQW/hHDznu5VsKLeRf/dt7XsT4a82olx7nLRhe0OUSdaCIsGS JPL0DUREDIg+guXYdg6L7sa09UOh8s4RydXAxvg9K0ZCITtm1xZh7Nwp7bTBHG0HgJOJ+c88k0N1 nG8VCAXPiakmhm7L+R44CEkwPhvARcI88iuGFFa/MT7ZHWG4NAamKW6CJXEOL6LLeF8H+3YYuFgU SuQUJ8rjiGA06XqNkb0lOK2/S2GbPGwPyu4AAAAASUVORK5CYII= In-Reply-To: (Stefan Monnier's message of "Mon, 29 Jul 2019 12:08:44 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 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:239020 Archived-At: Stefan Monnier writes: > I think we should clarify: > > - "time string", as returned by format-time-string and accepted > by parse-time-string. > > - "decoded time", i.e. a list of the form (SECOND MINUTE HOUR DAY MONTH YEAR IGNORED DST ZONE) > I just pushed a patch which defines the `decoded-time` *type*, so we can > refer to that precise name in docstrings. Makes sense. > - "time counted in seconds" for which we support several representations: > a plain number, a list of integers (HIGH LOW USEC PSEC), a pair of > integers (NUMERATOR . DENOMINATOR). > > And part of the confusion for me is that `encode-time` not only encodes > time, but can also be used to convert between different representations > of "time counted in seconds" (in which case it's not the inverse of > decode-time). Yes, that's something that I think was added by Paul late last year, and which I think was a mistake, because it makes things conceptually confusing. I think the stuff to convert between the various "time counted in seconds" stuff should be a separate function, because it has nothing to do with "decoded time". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no