<!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>
&nbsp;&nbsp;&nbsp; # Vyyyymmdd_hhmmss+tag, seconds in, new yyyymmdd_hhmmss out<br>
&nbsp;&nbsp;&nbsp; ts = afilename[1:-7]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use time stamp portion<br>
&nbsp;&nbsp;&nbsp; format = '%Y%m%d_%H%M%S'<br>
&nbsp;&nbsp;&nbsp; d = datetime(*(time.strptime(ts, format)[0:6]))<br>
&nbsp;&nbsp;&nbsp; print "sec: ", sec, type(d)<br>
&nbsp;&nbsp;&nbsp; diff = datetime.timedelta(seconds = sec)<br>
&nbsp;&nbsp;&nbsp; print type(diff)<br>
&nbsp;&nbsp;&nbsp; d = d + diff<br>
&nbsp;&nbsp;&nbsp; return d.strftime(format)<br>
  <br>
adjust_ftime('v20080120_000020.xx.dat',&nbsp; 33)<br>
</blockquote>
<br>
Results:<br>
sec:&nbsp; 33 &lt;type 'datetime.datetime'&gt;<br>
Traceback (most recent call last):<br>
&nbsp; File
"C:/Sandia_Meteors/Improved_Sentinel/Sentinel_Playground/Utility_Dev/junk.py",
line 14, in ?<br>
&nbsp;&nbsp;&nbsp; adjust_ftime('v20080120_000020.xx.dat', 33)<br>
&nbsp; File
"C:/Sandia_Meteors/Improved_Sentinel/Sentinel_Playground/Utility_Dev/junk.py",
line 9, in adjust_ftime<br>
&nbsp;&nbsp;&nbsp; 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&deg; 15' 7" N, 121&deg; 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: &lt;<a class="moz-txt-link-abbreviated" href="http://www.speckledwithstars.net/">www.speckledwithstars.net/</a>&gt;</pre>
</div>
</body>
</html>