Fix - to +
This commit is contained in:
		
							parent
							
								
									4c854f099a
								
							
						
					
					
						commit
						ce3bf75463
					
				| 
						 | 
					@ -162,7 +162,7 @@ async fn get_metrics(State(pool): State<deadpool_diesel::sqlite::Pool>, seconds:
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    let today_start = today.and_hms_opt(0, 0, 0);
 | 
					    let today_start = today.and_hms_opt(0, 0, 0);
 | 
				
			||||||
    // We start our week on Saturday, the end of the previous week
 | 
					    // We start our week on Saturday, the end of the previous week
 | 
				
			||||||
    let week_start = (today - chrono::Duration::days((current_time.weekday().num_days_from_sunday() - 1) as i64)).and_hms_opt(0, 0, 0);
 | 
					    let week_start = (today - chrono::Duration::days((current_time.weekday().num_days_from_sunday() + 1) as i64)).and_hms_opt(0, 0, 0);
 | 
				
			||||||
    let month_start = today.with_day(1).unwrap().and_hms_opt(0, 0, 0);
 | 
					    let month_start = today.with_day(1).unwrap().and_hms_opt(0, 0, 0);
 | 
				
			||||||
    let year_start = today.with_day(1).unwrap().with_month(1).unwrap().and_hms_opt(0, 0, 0);
 | 
					    let year_start = today.with_day(1).unwrap().with_month(1).unwrap().and_hms_opt(0, 0, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue