time.strptime() completes time module

brydon at my-deja.com brydon at my-deja.com
Fri Nov 10 15:22:42 EST 2000


Hello.  I don't feel up to trying to accomplish it, but strptime really
does make time complete.  time module has functions to go from seconds
to formatted.  It is complete when you can go back to seconds.
strptime allows you to take some time string representation and get it
into a standard format for differencing with other times, etc.  For
example I want to parse a timeclock file.  I can use code like:
  timeFormatPCTimeclock = "%Y/%m/%d  %H:%M:%S"
  tmp1=time.strptime(date1+'\t'+time1,timeFormatPCTimeclock)

and then subtract the times that come out to find the difference.  This
works on linux, but I need to run it on windows.  So I am really
missing it.
  I appreciate everyone's work on python very much.  Best, D

In article <mailman.973718223.20987.python-list at python.org>,
  "Tim Peters" <tim_one at email.msn.com> wrote:
> [Tim]
> >> + Does [this implementation of strptime] compile and run correctly
> >>   on all Python platforms?
>
> [Hrvoje Niksic]
> > Why is this necessary?  I thought it would be used only on platforms
> > that don't have a native strptime().
>
> See below.
>
> > + Is this particular version of strptime "the correct" one (strptime
> > isn't available everywhere *now* because it's not part of ANSI C, so
> > some platforms don't supply it -- while those that do apparently
> > don't always agree on its input->output behavior)?
>
> > I don't think any one of them is "correct", as even the standards
> > conflict on what should be done.  But still, even an average one
will
> > beat having none.
>
> Says you, and that's fine, but others won't agree.  Adding support for
> non-ANSI C functions is always a battle for this reason; you can't
avoid the
> fight by delcaring that *you* don't care.  That's what PEPs are for.
I
> personally have no interest in strptime, so don't wait for me to "do
> something"!  If nobody in the community cares enough to do the work,
so it
> goes.
>
> >> + Clause 3 renders this license incompatible with the GPL (the
> >> Regents of the U of CA have no authority to revoke such clauses in
> >> licenses other than their own).
>
> > I think the advertising clause has been removed from all BSD
software
> > some time ago.  The copyright notice might be out of date.
>
> So who's going to straighten that out?  I'm not interested.  Is
anyone else
> interested *enough*?
>
> nobody-yet-has-been-ly y'rs  - tim
>
>


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



More information about the Python-list mailing list