Re: datetime iso8601 string input
- From: Magnus Lycka <lycka@xxxxxxxxx>
- Date: Fri, 24 Feb 2006 10:27:03 +0100
Rubic wrote:
I can understand why datetime can't handle
arbitrary string inputs, but why not just
simple iso8601 format -- i.e. the default
output format for datetime?
Have you actually read the ISO 8601 standard?
If you have, you would know that parsing valid
ISO 8601 is fairly close to handling arbitrary
strings...
I suspect this absence is quite deliberate.
There are so many possible string formats that
are used and prefered in different situations,
and various loop holes with time zones and DST
etc, that it's probably better to let the
programmer take full responsibility over this
instead of providing a 10% solution.
ater all, it isn't very hard to use for instance
time.strptime() with some appropriate format,
and build datetime objects from that. Then
the programmer is in control.
.
- Follow-Ups:
- Re: datetime iso8601 string input
- From: Rubic
- Re: datetime iso8601 string input
- References:
- datetime iso8601 string input
- From: Rubic
- datetime iso8601 string input
- Prev by Date: Re: Unexpected timing results
- Next by Date: Re: MySQLdb slow on MySQL 5
- Previous by thread: datetime iso8601 string input
- Next by thread: Re: datetime iso8601 string input
- Index(es):
Relevant Pages
|