use local timezone where appropriate and fix tests between 0 and 1 o'clock
Some checks failed
CI/CD Pipeline / deploy-staging (push) Waiting to run
CI/CD Pipeline / deploy-main (push) Waiting to run
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-03-05 00:17:02 +01:00
parent 007b87e8ad
commit 5078c5f341
4 changed files with 25 additions and 9 deletions

View File

@ -13,7 +13,7 @@ impl Stat {
pub async fn boats(db: &SqlitePool, year: Option<i32>) -> Vec<Stat> {
let year = match year {
Some(year) => year,
None => chrono::Utc::now().year(),
None => chrono::Local::now().year(),
};
//TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server)
sqlx::query(&format!(
@ -39,7 +39,7 @@ ORDER BY rowed_km DESC;
pub async fn guest(db: &SqlitePool, year: Option<i32>) -> Stat {
let year = match year {
Some(year) => year,
None => chrono::Utc::now().year(),
None => chrono::Local::now().year(),
};
//TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server)
let rowed_km = sqlx::query(&format!(
@ -90,7 +90,7 @@ AND l.arrival LIKE '{year}-%';
pub async fn people(db: &SqlitePool, year: Option<i32>) -> Vec<Stat> {
let year = match year {
Some(year) => year,
None => chrono::Utc::now().year(),
None => chrono::Local::now().year(),
};
//TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server)
sqlx::query(&format!(