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/051503.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:09:34 CET 2005
[fdrake at users.sourceforge.net]
> Modified Files:
>        xmlrpclib.py
> Log Message:
> accept datetime.datetime instances when marshalling;
> dateTime.iso8601 elements still unmarshal into xmlrpclib.DateTime objects
> 
> Index: xmlrpclib.py

...

> +            if datetime and isinstance(value, datetime.datetime):
> +                self.value = value.strftime("%Y%m%dT%H:%M:%S")
> +                return

... [and similarly later] ...

Fred, is there a reason to avoid datetime.datetime's .isoformat()
method here?  Like so:

>>> import datetime
>>> print datetime.datetime(2005, 2, 10, 14, 0, 8).isoformat()
2005-02-10T14:00:08

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