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.emacs.bugs,gmane.comp.lib.gnulib.bugs Subject: bug#54764: encode-time: make DST and TIMEZONE fields of the list argument optional ones Date: Thu, 21 Apr 2022 21:46:38 +0300 Message-ID: <83ee1qqnox.fsf@gnu.org> References: <5ed963b2-3fa8-48d8-627e-bc0571d15b43@gmail.com> <149de00f-115b-5367-414f-c7700ef8966b@cs.ucla.edu> <2dd15844-01b3-0144-740c-185ec8488a81@cs.ucla.edu> <4a23f3a4-fe8f-d396-49d8-10034803be63@gmail.com> <52fb10fb-892a-f273-3be8-28793f27e204@cs.ucla.edu> <5cd820d4-ae67-43d4-9e63-c284d51ff1e4@gmail.com> <83tuapvcxs.fsf@gnu.org> <6efc5d24-34a2-fd30-cd20-fe4ac3e48310@cs.ucla.edu> <83fsm8tdzl.fsf@gnu.org> <9e4781b2-2ffa-b1ce-09b4-ead82cad9038@cs.ucla.edu> <83ilr3siku.fsf@gnu.org> <4e41671c-fae8-61c4-845c-4c7ba4317e88@cs.ucla.edu> <83fsm7sh2s.fsf@gnu.org> <83czhbsgc2.fsf@gnu.org> <33fb24fb-282b-cc13-a597-e7b63f19982d@cs.ucla.edu> <83y1zzq6kd.fsf@gnu.org> <3fbed833-b568-9736-ebfd-b57bfb598f1a@gmail.com> <83levyqvhp.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, bug-gnulib@gnu.org, 54764@debbugs.gnu.org To: Max Nikulin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 21 20:48:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nhbr2-0009bB-1P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Apr 2022 20:48:36 +0200 Original-Received: from localhost ([::1]:50570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhbr0-0005OT-Rs for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Apr 2022 14:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhbpW-0002TR-9k for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2022 14:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhbpW-0006qv-0R for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2022 14:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nhbpV-0001dB-U7 for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2022 14:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Apr 2022 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54764-submit@debbugs.gnu.org id=B54764.16505668106250 (code B ref 54764); Thu, 21 Apr 2022 18:47:01 +0000 Original-Received: (at 54764) by debbugs.gnu.org; 21 Apr 2022 18:46:50 +0000 Original-Received: from localhost ([127.0.0.1]:50921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhbpK-0001cj-HS for submit@debbugs.gnu.org; Thu, 21 Apr 2022 14:46:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhbpJ-0001cV-4c for 54764@debbugs.gnu.org; Thu, 21 Apr 2022 14:46:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhbpD-0006pX-6n; Thu, 21 Apr 2022 14:46:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Pl2dsDCkXDAnFy+gyDPw1CQCDFZk/Ty07EIeLRFcahI=; b=sJ6RETipWPtp b+cTonMG/9Z/PKmd0voTFrhMc8FhKiU/4NgcLBYzB4gKVZtyweEIZgoY0vIx/zFUpSpqUB0LKaoQ5 cqTPC9cXfuMDOcoP6nhrfjkSG8nSz3Js1uGb4KhBs6xUR/yu7+XXXz6PeXcvWmC64aS6gd/9vgPwq N92BRTJETg/zgiMizceaZ7p+DiU9NDfdSkziR3FEThkuKpl7wuwEsHdsujrkRn1QmqelEMyIc3HQd mP2lJozvjUtVS59pBFomDzbaL94cR7/UNpxCk9qs4NRzEPQ9CfHrF3ttkQaaLMoj9azjZXK5nOGPr cICE35fEUxF5IZrp2vpIvw==; Original-Received: from [87.69.77.57] (port=1787 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 1nhbpC-0003Zt-MD; Thu, 21 Apr 2022 14:46:43 -0400 In-Reply-To: (message from Max Nikulin on Fri, 22 Apr 2022 00:23:01 +0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230395 gmane.comp.lib.gnulib.bugs:45812 Archived-At: > Date: Fri, 22 Apr 2022 00:23:01 +0700 > Cc: eggert@cs.ucla.edu, bug-gnulib@gnu.org, 54764@debbugs.gnu.org > From: Max Nikulin > > >> Clock resolution generally has a little common with timers. > > > > I agree, but that's something you should tell/ask Paul, not myself. > > It may be deeper, e.g. additional call during initialization or extra > privileges may be required. No, that's not the case here. > >> I have no experience with windows-specific code, but quick search gives > >> GetSystemTimePreciseAsFileTime that should provide timestamps with fine > >> granularity > >> https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime > > > > That API exists only since Windows 8. > > I suspect that it means just that MS does not support anything prior to > Windows 8 any more. XP is mentioned in connection to this function: > https://www.lochan.org/2005/keith-cl/useful/win32time.html It doesn't matter to us, because we do support older versions. > Writing about possible intentional hiding of high precision clock I was > assuming latest windows versions, I believe, even Windows 8 is too old > for such modern tricks. There's no problem having high-resolution time stamps in Emacs on all versions of Windows since Windows 2000, but before we implement something like that, we should understand the goal and the effects on Lisp programs. Which is why I asked Paul questions that need to be answered before we talk about the implementation. > > More importantly the Gnulib > > implementation of current_timespec doesn't use it. > > Even if it is not used yet, is it intentional design decision or just an > issue that should be fixed? I am unsure what function > clock_gettime/timespec_get/gettimeofday is actually used on windows > platform and how it is implemented. We use gettimeofdate, because the more modern clock_gettime requires linking against pthreads in the MinGW64 builds, and we don't want that additional dependency. But since clock_gettime produces the same 15.6 msec granularity, we don't lose anything by using a slightly older interface. > It seems, only coarse clock is currently available in Emacs on Windows > due to usage of current_timespec. Yes. > Are there any known problem with 16ms resolution? Not that I know of, but please wait for the discussion with Paul to come to its conclusion.