all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Visher <tim.visher@gmail.com>
To: tomas@tuxteam.de
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
	Jean Louis <bugs@gnu.support>, Yuri Khan <yuri.v.khan@gmail.com>
Subject: Re: How to format this type of timestamp
Date: Mon, 5 Oct 2020 08:46:06 -0400	[thread overview]
Message-ID: <CAHa53uye=VVH9jKi8J_0+fOg51KnR3=ks42rdXckqRm94nHECw@mail.gmail.com> (raw)
In-Reply-To: <20201005103411.GA27174@tuxteam.de>

On Mon, Oct 5, 2020 at 6:36 AM <tomas@tuxteam.de> wrote:

> On Mon, Oct 05, 2020 at 12:05:40PM +0300, Jean Louis wrote:
> > * Yuri Khan <yuri.v.khan@gmail.com> [2020-10-04 21:42]:
> > > I think tomas’s 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 specifier
> > > to preserve the detected time zone in the string.
> > >
> > >     (format-time-string "%F %T.%6N%Z" (/ 1599549641372 1000.0))
> > >     ⇒ "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/


  reply	other threads:[~2020-10-05 12:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03 11:55 How to format this type of timestamp Jean Louis
2020-10-03 12:22 ` Eli Zaretskii
2020-10-04  4:28   ` Jean Louis
2020-10-04  7:32     ` Eli Zaretskii
2020-10-04  7:47     ` tomas
2020-10-04 14:08       ` Jean Louis
2020-10-04 15:01         ` tomas
2020-10-04 16:59           ` Jean Louis
2020-10-04 18:41             ` Yuri Khan
2020-10-04 19:26               ` tomas
2020-10-05  9:05               ` Jean Louis
2020-10-05 10:34                 ` tomas
2020-10-05 12:46                   ` Tim Visher [this message]
2020-10-05 13:10                     ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHa53uye=VVH9jKi8J_0+fOg51KnR3=ks42rdXckqRm94nHECw@mail.gmail.com' \
    --to=tim.visher@gmail.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tomas@tuxteam.de \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.