A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051505.html below:

[Python-checkins] python/dist/src/Lib xmlrpclib.py, 1.38, 1.39

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib xmlrpclib.py, 1.38, 1.39Tim Peters tim.peters at gmail.com
Thu Feb 10 20:44:21 CET 2005
[Tim]
>> Fred, is there a reason to avoid datetime.datetime's .isoformat()
>> method here?  Like so:

> Yes.  The XML-RPC spec is quite vague.  It claims that the dates are in ISO
> 8601 format, but doesn't say anything more about it.  The example shows a
> string without hyphens (but with colons), so I stuck with eactly that.

Well, then since that isn't ISO 8601 format, it would be nice to have
a comment explaining why it's claiming to be anyway <0.5 wink>.

>> A possible downside is that you'll also get fractional seconds if the
>> instance records a non-zero .microseconds value.

> There's nothing in the XML-RPC spec about the resolution of time, so, again,
> I'd rather be conservative in what we generate.

    dt.replace(microsecond=0).isoformat()

suffices for that much.  Tack on .replace('-', '') to do the whole job.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4