From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to format this type of timestamp
Date: Sat, 03 Oct 2020 15:22:27 +0300 [thread overview]
Message-ID: <83pn5zfqik.fsf@gnu.org> (raw)
In-Reply-To: <20201003115510.GH32715@protected.rcdrun.com> (message from Jean Louis on Sat, 3 Oct 2020 14:55:10 +0300)
> Date: Sat, 3 Oct 2020 14:55:10 +0300
> From: Jean Louis <bugs@gnu.support>
>
> I would like to format this: (date . "1599712637489") to something
> like 2020-10-02 20:06:41.119184+03
>
> Here it works, I get: Saturday, March 24, 2018 6:08:38.010 PM
> https://www.epochconverter.com/
>
> That is probably the right time.
>
> Which function should I use, I tried format-time-string, but is not
> working.
Where did you get the value 1599712637489? What is its semantics?
The number of seconds since the epoch is several orders of magnitude
smaller. E.g., this works:
(format-time-string "%c" 1599712637.489)
where I divided the value you provided by 1000.
next prev parent reply other threads:[~2020-10-03 12:22 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pn5zfqik.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).