W3C home > Mailing lists > Public > www-archive@w3.org > November 2010

Re: Format modifier suggestion for format-time-string

From: Edward O'Connor <hober0@gmail.com>
Date: Fri, 19 Nov 2010 11:36:19 -0800
Message-ID: <AANLkTimqTotxj9YJQc46M_YkV-Vx-HucP0T3uz=EToRB@mail.gmail.com>
To: emacs-devel@gnu.org
Cc: www-archive@w3.org

>> I'd like to suggest the addition of a : modifier, such that
>> (format-time-string "%:z") would generate an RFC 3339-compatible time
>> zone offset.
> What a coincidence.  :-)

No coincidence—it was that emacs-devel thread that reminded me of this

> I've been playing with dropping the gnulib strftime.c into Emacs
> today, and that seems to make %:z work as required:

I'm very happy to hear it!

> I'm guessing this will be for Emacs 24, though.

I suppose I'll go with something like this compatibility test for now:

(let ((test "%:z")) (string-equal test (format-time-string test)))

Thanks again,
Received on Friday, 19 November 2010 19:37:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:33:54 UTC