From: tomas@tuxteam.de
To: Xavier Maillard <xma@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Timestamps and php
Date: Sun, 15 Nov 2009 07:14:02 +0100 [thread overview]
Message-ID: <20091115061402.GA14534@tomas> (raw)
In-Reply-To: <200911150024.nAF0Oco8013304@fed.local>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Nov 15, 2009 at 01:24:38AM +0100, Xavier Maillard wrote:
> Hi,
>
> Using a XML-RPC call, I am returned this information:
>
> :datetime (19198 34091)
>
> I'd like this to be transformed in something I can read. I know
> encode/decode functions but I don't know how I can display the
> result using format-time-string. Any idea ?
(format-time-string "%Y-%m-%d %H:%M:%S" (current-time) t)
=> "2009-11-15 06:14:49"
[That's in UTC -- see the function doc for tons and tons of options]
> While at it, how can I convert a date into a "PHP timestamp"
> which, as far as I know, looks like 1258190619.0.
Whatever a "PHP timestamp" may be, but it looks a lot like the number of
seconds since the Epoch. You might give the function float-time a try.
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFK/5wqBcgs9XrR2kYRApICAJ9b38WttJKlbwEVoUO/+3lHF9hTPwCfTCu9
wMMpCzmoDHvkophyyhX7QqI=
=tAfM
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2009-11-15 6:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-15 0:24 Timestamps and php Xavier Maillard
2009-11-15 6:14 ` tomas [this message]
2009-11-15 8:58 ` [SOLVED] " Xavier Maillard
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=20091115061402.GA14534@tomas \
--to=tomas@tuxteam.de \
--cc=help-gnu-emacs@gnu.org \
--cc=xma@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).