From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.devel Subject: Can `format-time-string' produce full/extended ISO 8601 times? Date: Thu, 30 Jul 2009 18:10:26 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1248991880 17608 80.91.229.12 (30 Jul 2009 22:11:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2009 22:11:20 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 31 00:11:13 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWdqB-00071q-Mq for ged-emacs-devel@m.gmane.org; Fri, 31 Jul 2009 00:11:12 +0200 Original-Received: from localhost ([127.0.0.1]:50597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWdqA-0006U0-Ot for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2009 18:11:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWdpb-0006A8-Iq for emacs-devel@gnu.org; Thu, 30 Jul 2009 18:10:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWdpW-00068O-NM for emacs-devel@gnu.org; Thu, 30 Jul 2009 18:10:35 -0400 Original-Received: from [199.232.76.173] (port=39356 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWdpW-00068I-HF for emacs-devel@gnu.org; Thu, 30 Jul 2009 18:10:30 -0400 Original-Received: from mail-gx0-f219.google.com ([209.85.217.219]:54822) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWdpW-0003WB-6D for emacs-devel@gnu.org; Thu, 30 Jul 2009 18:10:30 -0400 Original-Received: by gxk19 with SMTP id 19so3198610gxk.18 for ; Thu, 30 Jul 2009 15:10:26 -0700 (PDT) Original-Received: by 10.151.49.12 with SMTP id b12mr1817447ybk.249.1248991826776; Thu, 30 Jul 2009 15:10:26 -0700 (PDT) X-Google-Sender-Auth: 05ee50771b1e6e22 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113429 Archived-At: Does `format-time-string' produce full/extended ISO 8601 format times? - Docstring of `format-time-string' states: "For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z"." As best I can gather this is _not_ a 'full' ISO 8601 time string format. Specifically, section 4.2.5.1-2 of ISO 8601:2004(E) -- 4.2.5.1 Difference between local time and UTC of day Basic format: =C2=B1hhmm Example: +0100 =C2=B1hh +01 Extended format: =C2=B1hh:mm Example: +01:00 -- 4.2.5.2 Local time and the difference from UTC Basic format: hhmmss=C2=B1hhmm Example: 152746+0100 152746=E2=88=920500 hhmmss=C2=B1hh 152746+01 152746=E2=88=9205 Extended format: hh:mm:ss=C2=B1hh:mm Example: 15:27:46+01:00 15:27:46=E2=88=9205:00 hh:mm:ss=C2=B1hh 15:27:46+01 15:27:46=E2=88=9205 --- I am referencing from the .pdf available here: (URL `http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?fu= nc=3Ddoc.Fetch&nodeid=3D4021199') ---- Is it possible to format the UTC offset/ZONE with a colon per the Extended format above? On a w32 system I'm get these results: (format-time-string "%Y-%m-%dT%T%z") ;=3D>"2009-07-30T18:04:56-0400" (format-time-string "%Y-%m-%dT%T,%u%z") ;=3D>"2009-07-30T18:04:36,4-0400" (format-time-string "%Y-%m-%dT%T,%u%z" nil t) "2009-07-30T22:05:47,4+0000Z" (format-time-string "%Y-%m-%dT%T,%u%z" (current-time) t) ;=3D>"2009-07-30T22:06:10,4+0000" ----- GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-06-30 on LENNART-69DE564 (patched) s_P