From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Represent NTP's origin time Date: Thu, 15 Apr 2021 08:22:29 +0000 Message-ID: <3ed97a9c537f11069676@heytings.org> References: <8735vsrmyh.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="983"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 15 10:24:08 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lWxIG-0000A5-Iv for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Apr 2021 10:24:08 +0200 Original-Received: from localhost ([::1]:38664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWxIF-0007gq-KP for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Apr 2021 04:24:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWxGm-00043t-AR for emacs-devel@gnu.org; Thu, 15 Apr 2021 04:22:36 -0400 Original-Received: from heytings.org ([95.142.160.155]:42786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWxGk-00036j-GX for emacs-devel@gnu.org; Thu, 15 Apr 2021 04:22:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1618474950; bh=pKUFRiC5SlTSoche3PKPGJZgGQDKxBh5tTVTYm54auY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=pplnT2LVfnyU84tkg2USoGbxTKAnRzq03dzKCNmD1nap3pYVqJytIvQWCiRtfOa13 0EvSyFhPSwQgH4eDVWiY8hz2BvlarbW0vCmhk8JnyerkC/RaeGBc1fFg7jhWNaneS9 Q1yi6ogZdcCUeFlPVxld36CVBV3Cn9M/a4fWXZs4MwPtHwstUeW+yqXKZmb/O9Fv51 C4uS75za/voaCgcVdNvj5Mqn+pQ3pSAbddtsFNBYVWJNG+8e48JBz4hqXiwRnbMdtJ lOkSrXH+jTplaHd5wd7j3CtGxHhlsvFoOCoVtPWv3qWrkhk8JyzFeQu3vajfxDfld0 6CDa1sIvTnBHQ== In-Reply-To: <8735vsrmyh.fsf@igel.home> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268080 Archived-At: >> NTP represents time stamps by counting seconds from January 1 1900, but >> my Emacs doesn't seem to be able to represent this: >> >> (encode-time (parse-time-string "1902-01-01T00:00-00:00")) >> => (-32745 59520) >> (encode-time (parse-time-string "1900-01-01T00:00-00:00")) >> => (error "Specified time is not representable") >> >> Do we have some "standard" workaround? > > Worksforme. > > ELISP> (encode-time (parse-time-string "1900-01-01T00:00-00:00")) > (-33707 33152) > Works for me, too: (encode-time (parse-time-string "9999-01-01T00:00-00:00")) (3866131 3584) (encode-time (parse-time-string "0000-01-01T00:00-00:00")) (-948597 33792) (encode-time (parse-time-string "-9999-01-01T00:00-00:00")) (-5763323 19328)