Commit f00235e3 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

FIX: Time delta fixed when converting doy to date.

parent effeac18
......@@ -19,7 +19,7 @@ def getDatesFromFiles(fld,
dt = os.path.basename(f)[date_pos:date_pos + date_len]
if date_jul:
y, jd = int(dt[0:4]), int(dt[4:7])
dt = (datetime.datetime(y, 1, 1) + datetime.timedelta(jd)).strftime('%Y%m%d')
dt = (datetime.datetime(y, 1, 1) + datetime.timedelta(jd - 1)).strftime('%Y%m%d')
df.write(dt + '\n')
return
......@@ -45,7 +45,7 @@ def temporalSmoothing(fld,
dt = os.path.basename(f)[date_pos:date_pos+date_len]
if date_jul:
y,jd = int(dt[0:4]),int(dt[4:7])
dt = (datetime.datetime(y,1,1) + datetime.timedelta(jd)).strftime('%Y%m%d')
dt = (datetime.datetime(y,1,1) + datetime.timedelta(jd - 1)).strftime('%Y%m%d')
df.write(dt+'\n')
cmd += [f]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment