<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
What's the problem here. It seems right to me. line 9 is diff =...<br>
<blockquote>import time<br>
from datetime import datetime<br>
def adjust_ftime(afilename, sec):<br>
# Vyyyymmdd_hhmmss+tag, seconds in, new yyyymmdd_hhmmss out<br>
ts = afilename[1:-7] # use time stamp portion<br>
format = '%Y%m%d_%H%M%S'<br>
d = datetime(*(time.strptime(ts, format)[0:6]))<br>
print "sec: ", sec, type(d)<br>
diff = datetime.timedelta(seconds = sec)<br>
print type(diff)<br>
d = d + diff<br>
return d.strftime(format)<br>
<br>
adjust_ftime('v20080120_000020.xx.dat', 33)<br>
</blockquote>
<br>
Results:<br>
sec: 33 <type 'datetime.datetime'><br>
Traceback (most recent call last):<br>
File
"C:/Sandia_Meteors/Improved_Sentinel/Sentinel_Playground/Utility_Dev/junk.py",
line 14, in ?<br>
adjust_ftime('v20080120_000020.xx.dat', 33)<br>
File
"C:/Sandia_Meteors/Improved_Sentinel/Sentinel_Playground/Utility_Dev/junk.py",
line 9, in adjust_ftime<br>
diff = datetime.timedelta(seconds = sec)<br>
AttributeError: type object 'datetime.datetime' has no attribute
'timedelta'<br>
<br>
<div class="moz-signature">-- <br>
<meta content="text/html;" http-equiv="Content-Type">
<title>Signature.html</title>
<pre class="moz-signature" cols="76"> Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet
<font color="#330099">
</font> "Though no one can go back and make a brand new start,
         ANYONE can start from now and make a brand new end."
                 -- Anonymous
Web Page: <<a class="moz-txt-link-abbreviated" href="http://www.speckledwithstars.net/">www.speckledwithstars.net/</a>></pre>
</div>
</body>
</html>