time.strptime() not supported in windows? what the.....

David C. Ullrich david_ullrich at my-deja.com
Mon Aug 7 12:46:56 EDT 2000


In article <YdBj5.66324$6y5.43696402 at news2.rdc2.tx.home.com>,
  "Michael Morrison" <borlak at home.com> wrote:
>
> Now this is odd....
>
> windows:
> >>> time.strptime("08/07/2000 11:03", "%m/%d/%Y %H:%M")
> Traceback (innermost last):
>   File "<interactive input>", line 0, in ?
> AttributeError: strptime
>
> unix:
> >>> time.strptime("08/07/2000 11:03", "%m/%d/%Y %H:%M")
> (2000, 8, 7, 11, 3, 0, 0, 220, 0)
> >>> time.asctime(time.strptime("08/07/2000 11:03", "%m/%d/%Y %H:%M"))
> 'Mon Aug  7 11:03:00 2000'
>
> Okay...WHY isn't this function supported in windows?

     When I asked about this the answer appeared to be
"because it isn't". I'd already worked around _my_ problem,
so I didn't notice the posts a little later pointing out
that there are also date-parsing functions in the rfc822
module that may help.

> That's got to be
the
> craziest thing I've ever seen in python so far.  If you need, _ILL_
make the
> function for the windows platform.
>
>

--
Oh, dejanews lets you add a sig - that's useful...


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list