Re: time.mktime problem

2005-09-05 Thread Edvard Majakari
"McBooCzech" <[EMAIL PROTECTED]> writes: > ===snip=== > Values 100-1899 are always illegal. > . > . > strptime(string[, format]) > . > . > The default values used to fill in any missing data are: > (1900, 1, 1, 0, 0, 0, 0, 1, -1) > ===snip=== > > BTW, check the following code: >>>import datetime,

Re: time.mktime problem

2005-08-30 Thread McBooCzech
according to the Python documentation: http://docs.python.org/lib/module-time.html ===snip=== Values 100-1899 are always illegal. . . strptime(string[, format]) . . The default values used to fill in any missing data are: (1900, 1, 1, 0, 0, 0, 0, 1, -1) ===snip=== BTW, check the following code: >

Re: time.mktime problem

2005-08-30 Thread Edvard Majakari
"McBooCzech" <[EMAIL PROTECTED]> writes: > Hi, on Linux (Fedora FC4) and Python 2.4.1 > I am trying to know the time delta in seconds between two times given > in the HHMMSS format. My code looks like: > > import datetime, time > ta1=(time.strptime('01', '%H%M%S')) > ta2=(time.strptime('230344

Re: time.mktime problem

2005-08-30 Thread Matt Hammond
I don't get the same results: >>> import datetime, time >>> ta1=(time.strptime('01', '%H%M%S')) >>> ta2=(time.strptime('230344', '%H%M%S')) >>> t1=time.mktime(ta1) >>> t2=time.mktime(ta2) >>> print t1, t2 -2208988799.0 -2208905776.0 >>> print t1-t2 -83023.0 Suse 9.3, python 2.4 (all 64bit)

time.mktime problem

2005-08-30 Thread McBooCzech
Hi, on Linux (Fedora FC4) and Python 2.4.1 I am trying to know the time delta in seconds between two times given in the HHMMSS format. My code looks like: import datetime, time ta1=(time.strptime('01', '%H%M%S')) ta2=(time.strptime('230344', '%H%M%S')) t1=time.mktime(ta1) t2=time.mktime(ta2) p