From: Dave Benjamin <dave@ramenlabs.com>
To: Richard Jones <rich@annexia.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] ANN: XmlRpc-Light 0.4 - Now a server too
Date: Sun, 29 Jul 2007 16:09:22 -0700 [thread overview]
Message-ID: <46AD1E22.6080705@ramenlabs.com> (raw)
In-Reply-To: <20070729211615.GA25630@furbychan.cocan.org>
Richard Jones wrote:
> On Sun, Jul 29, 2007 at 10:51:17AM -0700, Dave Benjamin wrote:
>> - The default date-time functions use the format
>> "20070729T10:42:00-07:00". This seems to be the most common
>> interpretation of ISO 8601 used in XML-RPC servers. You can override
>> this behavior by calling the "set_datetime_encode" or
>> "set_datetime_decode" methods on the client or server.
>
> You might want to take a look at Julien Signoles' Calendar library for
> date/time types and handling:
>
> http://www.lri.fr/~signoles/prog/calendar/
I have this library installed, and indeed considered using it when I
began writing the date-time support. I would likely have used it, if
only it had the ability to parse strings.
I really wish Winer had considered alternatives to ISO 8601--say, UTC
epoch seconds--in the design of XML-RPC, because it's barely a standard
at all! There are so many variations and options that writing a parser
for it borders on natural language processing. Even the W3C suggestion,
which restricts ISO 8601 to a very small subset, doesn't help here since
it still conflicts with the common usage in XML-RPC, with hyphens
omitted between the date values. I decided to err on the side of
oversimplification, and support only the most common format, leaving in
hooks for users to customize the behavior as required.
There is still benefit, of course, in using a standard date-time type. I
only wonder if it is worth adding another library dependency; I am
trying hard to keep the list small (currently only Xml-Light and
Ocamlnet, which in turn requires PCRE). I think it would be great if a
date-time type were made part of the official OCaml distribution.
My only qualm with the Calendar library is that I feel a bit
uncomfortable with a top-level module called "Printer" that is for the
specific purpose of date formatting. I would assume that a module by
that name were for communicating with "lpt", if anything. But hey,
what's in a name, anyway... =)
Thanks for the advice. I will consider it.
Cheers,
Dave
next prev parent reply other threads:[~2007-07-29 23:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-29 17:51 Dave Benjamin
[not found] ` <20070729211615.GA25630@furbychan.cocan.org>
2007-07-29 23:09 ` Dave Benjamin [this message]
[not found] ` <912A68A9-3C5A-44FC-B563-4033E4EE6235@epfl.ch>
2007-08-19 18:29 ` [Caml-list] " Dave Benjamin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46AD1E22.6080705@ramenlabs.com \
--to=dave@ramenlabs.com \
--cc=caml-list@inria.fr \
--cc=rich@annexia.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