I'm trying to generate a period of time stamps from 21 august to 23 oct. Each time stamps has a time delta of 15 minutes.
The problem with current code is some days are missing. Can't find a logical problem here. The data is too much to debug.
hours_counter = 0
minutes_counter = 0
days_counter = 0
for j in range(30):
days_counter = days_counter + 1
if days_counter > 30:
days_counter = 0
for i in range(360):
minutes_counter = minutes_counter + 15
if minutes_counter == 45:
minutes_counter = 0
hours_counter = hours_counter + 1
s = datetime.strptime('2018-08-21', '%Y-%m-%d') + timedelta(hours=hours_counter,
minutes=minutes_counter,
days=days_counter)
timeStamps.append(s)
path = os.path.join(
r'C:\\ahmed\\SpeedFT-meter12\\peakdata\\' + s.strftime("%Y-%m-%d") + r'\\peakdata_' + s.strftime(
"%Y%m%d_%H%M") + r'.bz2')
directoary_names.append(path)