unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: sirgazil <sirgazil@zoho.com>
To: Guile User <guile-user@gnu.org>
Subject: How do you format date-times in RFC 3339 style?
Date: Mon, 11 Feb 2019 14:02:42 -0500	[thread overview]
Message-ID: <1177d8cd-e03c-a7f7-7a32-a5e27004acad@zoho.com> (raw)

Hi,

I'm generating atom feeds from SXML that don't validate because of the 
date-time format I'm using:

 > (use-modules (srfi srfi-19))
 > (date->string (current-date) "~Y-~m-~dT~H:~M.~S~z")
$1 = "2019-02-11T13:42.57-0500"

String $1 is close to the RFC 3339 style,¹ which is the required format 
for atom feeds, but the time zone offset should be -05:00, and Guile's 
SRFI-19 ~z time zone escape is RFC 822 style, which formats the time 
zone offset as -0500.

What should I do to get the offset in the required format?


Thanks,


_____

1. http://www.faqs.org/rfcs/rfc3339.html


-- 
Luis Felipe López Acevedo
http://sirgazil.bitbucket.io/





             reply	other threads:[~2019-02-11 19:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 19:02 sirgazil [this message]
2019-02-11 21:39 ` How do you format date-times in RFC 3339 style? Nala Ginrut
2019-02-11 21:40   ` Nala Ginrut
2019-02-12 14:33   ` sirgazil
2019-02-12 16:18     ` Nala Ginrut
2019-02-12 17:33       ` sirgazil
2019-02-12 16:50     ` Ricardo Wurmus
2019-02-12 18:15       ` sirgazil
  -- strict thread matches above, loose matches on Subject: below --
2019-02-12 18:29 tantalum
2019-02-12 18:33 tantalum
2019-02-13 14:21 ` sirgazil
2019-02-14 19:26   ` tantalum
2019-02-14 21:13     ` Ricardo Wurmus

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/guile/

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

  git send-email \
    --in-reply-to=1177d8cd-e03c-a7f7-7a32-a5e27004acad@zoho.com \
    --to=sirgazil@zoho.com \
    --cc=guile-user@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).