From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Visher Newsgroups: gmane.emacs.help Subject: Re: How to format this type of timestamp Date: Mon, 5 Oct 2020 08:46:06 -0400 Message-ID: References: <20201003115510.GH32715@protected.rcdrun.com> <83pn5zfqik.fsf@gnu.org> <20201004042834.GJ32715@protected.rcdrun.com> <20201004074733.GA25970@tuxteam.de> <20201004140803.GB15516@protected.rcdrun.com> <20201004150117.GA9423@tuxteam.de> <20201004165940.GC15516@protected.rcdrun.com> <20201005090540.GD4453@protected.rcdrun.com> <20201005103411.GA27174@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36419"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Jean Louis , Yuri Khan To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 14:48:07 2020 Return-path: Envelope-to: geh-help-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 1kPPuR-0009L0-AA for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 14:48:07 +0200 Original-Received: from localhost ([::1]:57630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPPuQ-00054A-AK for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 08:48:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPPtC-00052M-S7 for help-gnu-emacs@gnu.org; Mon, 05 Oct 2020 08:46:50 -0400 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:35684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPPtA-0008Gd-4Z for help-gnu-emacs@gnu.org; Mon, 05 Oct 2020 08:46:50 -0400 Original-Received: by mail-wm1-x336.google.com with SMTP id y15so8652995wmi.0 for ; Mon, 05 Oct 2020 05:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=18Mqq9KC7HxaWaAWkc9UUiHjGnSONP2YBgQMkz21drw=; b=aWCqF725kOwjMD/i4CTAvpCAa3bfVdE+ZCvM0uf1CDRajk71NqxsSNDdqaS1rKR7jT 3vdBciyR4eL/Y7ggXD3WhGLWYHSufKYLk/vje3JUVmC5ZQpreS245zU0kznzkQ928uUw vNkAqbX5XAwBGvk00ftpVJvGLrw9oNGFkTzsOke4OhYDcqxb98s0udfHkE1//RrZGRhr Vd+Ih9Wpb9r3V9QWy20zImJM5+4ApleDZnZxcqbatDlCRZV07X0vMWg4euJSZwdhk5Wn AumQLcNw6AvKOplr01RU12vB2hY+MKys2si+hgZN3u4uiznKROqNtmPWotg8130UXCu3 jO7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=18Mqq9KC7HxaWaAWkc9UUiHjGnSONP2YBgQMkz21drw=; b=CILB1rM2SNQbeHFvKLOptokuHai0XiHSQC0a0WpSa2O/U/vT1R5CRi4MeqJnP3R5Pf OuNQ1c4dW9rGtUJXouQbrOBHl0H8N11g48L99agBEdyO3MDOMIBUNM8ITnVeqnTB8Wol WP6T7Te61V1oC8g0ZXKrhFvtg9hjo1S/B0EI4bdWuOeV6DhuCtsxWw7WUN48VBYxhBQo /BgpKr0TH+Xs/jhU5BRVb5sCbkDye468eYAa8BeK6p9F85psNCkdxgIxpDDc319fjYzA rUC13WZykPHJmqDGVfmLnckTQiJpVRlnLGft8aP9J1nL7qjCAX9NHas0nNWPfxAIVv01 y4LQ== X-Gm-Message-State: AOAM533jRn2SETbPgU1XRJ7DvKI0Zt2W5BhEptDgzn1IfvbR9nVMYELN KmLiP091dQccjPKzwcOpwmJy6qoeU26rQw5Qgb4= X-Google-Smtp-Source: ABdhPJwsmnM8ZC4CXuctLyO9vXkaJXsE8ZBDfnxLCNIHXkfI37dEbTjIw/TcbftDvwq49PSHAIA6xVayK2CftNvn25w= X-Received: by 2002:a1c:4b04:: with SMTP id y4mr16697276wma.111.1601902004876; Mon, 05 Oct 2020 05:46:44 -0700 (PDT) In-Reply-To: <20201005103411.GA27174@tuxteam.de> Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=tim.visher@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124316 Archived-At: On Mon, Oct 5, 2020 at 6:36 AM wrote: > On Mon, Oct 05, 2020 at 12:05:40PM +0300, Jean Louis wrote: > > * Yuri Khan [2020-10-04 21:42]: > > > I think tomas=E2=80=99s remark was about the fact that you hardcode += 03 in > > > your format string but you let Emacs auto-detect your local time zone= . > > > This can cause an inconsistency if it detects a zone other than +03. > > > Two better options would be: > > > > > > a. Let Emacs auto-detect the time zone and use the %Z format specifie= r > > > to preserve the detected time zone in the string. > > > > > > (format-time-string "%F %T.%6N%Z" (/ 1599549641372 1000.0)) > > > =E2=87=92 "2020-09-08 14:20:41.371999+07" > > > > Thank you. > > > > It is not good to hard code in my specific case, and also not good to > > assume the default local time zone as messages are coming from various > > countries in various time zones, it is not practical that I assume my > > local time zone, so I am waiting for the answer from developers of > > Silence SMS application, as maybe the time is UTC time, then it will > > be alright, then I can convert it properly to PostgreSQL timestamp > > with time zone. > > I think you don't need that response. They'd be foolish to have a purely > numerical timestamp be other than "seconds [1] from Epoch, in UTC", where > Epoch is 1970-01-01 (well Mac has Epoch on 1900-01-01: whether that's > foolish is left as an exercise to the reader). > > Simply because there's no means to communicate. > > Typically when /displaying/ the date to a human reader, you pick this > human reader's timezone (or whatever you guess her timezone is). > Isn't time fun? https://yourcalendricalfallacyis.com/