A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/311125.html below:

time.strptime intolerant on weekday string length?

time.strptime intolerant on weekday string length? time.strptime intolerant on weekday string length?Fredrik Lundh fredrik at pythonware.com
Tue Sep 13 13:56:22 EDT 2005
Robert wrote:

>A certain DAV server reports a time stamp as "Tues, 30 Aug 2005 20:48:31"
> ( but not "Tue, ..."  as usual)

> I also don't see how to alter the pattern for strptime to be tolerante for
> more long weekday strings?
> Any ideas?

why bother parsing the day name at all?  (just split the string at the first
command and use strptime on the rest)

> Shouldn't it be possible to insert real regexp-like stuff in the pattern?

if you need an RE, use an RE.  no need to use strptime if you don't what
that behaviour (to convert the RE result to a time value, use time.mktime,
calender.timegm, or the datetime module, depending on what you want)

</F> 




More information about the Python-list 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