No strptime in Windows?

david_ullrich at my-deja.com david_ullrich at my-deja.com
Sun Jun 11 14:25:13 EDT 2000


      Last night I saw two replies to this which are
not yet visible here at the office due to mysteries
of usenet and deja.com. Thanks, but I'm still puzzled -
if anyone can figure out what I'm misunderstanding I'd
appreciate it:

       Both replies explained that strptime must not
be available on the Windows platform. I surmised as
much. But the problem is I'm not aware that there's
anything like strftime() in Windows either. (I
certainly could be wrong about that. But eg the
Delphi DateToStr function doesn't take advantage of
any Windows functions, it does it all by hand in
Pascal code...)

       Maybe I'm not clear on exactly what "the
platform" is. I've taken that to mean "Windows".
But maybe when people say I'm using the Windows
platform that's shorthand for saying the platform
I'm using is "Windows C"? (No, that can't be it,
because surely there's no such thing as "Windows
C".) Or the "platform" is the specific C compiler
that was used? (No, that can't be it either...)

     I'm so confused. You'd think I'd be used to
that by now.

      Reminds me of when I'd hear VB guys wonder
why they couldn't do something, saying that they
could set the pen width to 0 in C. I didn't follow
that, seemed to me that there couldn't possibly be
a notion of "pen width" in C. Years later I realized
that what they actually meant was something about
the pen width in some specific C implementation.
If anyone has an analogous clarification here that
would be great - exactly what is it that's missing
strptime, so that my Python doesn't have one available
to wrap?

    (When I asked the question I was assuming that
most of the time.this/that functions were done "by
hand" in the Windows version of Python.)

DU

In article <8hu4tc$6m0$1 at nnrp1.deja.com>,
  david_ullrich at my-deja.com wrote:
>     The docs say that time.strptime may not be available
> on all platforms. It doesn't seem to be available under MS
> Windows. I don't see why not - there's nothing Windological
> about strptime but the same applies to the other time
> functions that _are_ included.
>
>     (I'm getting the time from somewhere on the internet.
> What I get is something like "Sat Jun 10 18:34:10 2000"
> and I have to subtract five hours. Ended up more or less
> writing my own strptime, at least I _think_ I did...)
>
>     Also: Is Monday really day 0? I woulda thought
> Sunday was day 0. (Doesn't seem to matter in the
> subtract-five-hours thing, I get the same results
> either way. Evidently mktime() ignores the day-of-week
> if it's inconsistent with the day-of-month field?)
>
> DU.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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



More information about the Python-list mailing list