Fix rounding.
This commit is contained in:
		@@ -123,7 +123,9 @@ def history():
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    ## Duration of significant heat increases
 | 
					    ## Duration of significant heat increases
 | 
				
			||||||
    # Timestep from raw database values for temperature
 | 
					    # Timestep from raw database values for temperature
 | 
				
			||||||
    timestep_minutes = (datetime.datetime.strptime(temperatures[1][0], "%Y-%m-%d %H:%M:%S")-datetime.datetime.strptime(temperatures[0][0], "%Y-%m-%d %H:%M:%S")).seconds/60
 | 
					    timestep_minutes = int(round((datetime.datetime.strptime(temperatures[1][0], "%Y-%m-%d %H:%M:%S")-datetime.datetime.strptime(temperatures[0][0], "%Y-%m-%d %H:%M:%S")).seconds/60))
 | 
				
			||||||
 | 
					    if (timestep_minutes == 0):
 | 
				
			||||||
 | 
					        timestep_minutes = 1
 | 
				
			||||||
    # Calculate minutes for each streak
 | 
					    # Calculate minutes for each streak
 | 
				
			||||||
    streak_minutes = streak_lengths(time_series_temperature_values)*timestep_minutes
 | 
					    streak_minutes = streak_lengths(time_series_temperature_values)*timestep_minutes
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -78,7 +78,7 @@
 | 
				
			|||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    Furnace averaging {{ "%.2f" % (total_minutes/range_hours) }} minutes/hr ({{ total_minutes }} minutes total).
 | 
					    Furnace averaging {{ "%.0f" % (total_minutes/range_hours) }} minutes/hr ({{ total_minutes }} minutes total).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class='row' id='plotly-plot'></div>
 | 
					    <div class='row' id='plotly-plot'></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user