feat(timezone): Adds timezone as option

This commit is contained in:
Michel Fedde 2025-06-29 21:52:53 +02:00
parent 0b9089ffae
commit b852c06f83
11 changed files with 278 additions and 22 deletions

View file

@ -36,11 +36,11 @@ export class PlaydateRepository extends Repository<PlaydateModel, DBPlaydate> {
}
findPlaydatesInRange(fromDate: Date, toDate: Date | undefined = undefined, group: GroupModel | undefined = undefined) {
let sql = `SELECT * FROM ${this.schema.name} WHERE time_from > ?`;
let sql = `SELECT * FROM ${this.schema.name} WHERE time_from >= ?`;
const params = [fromDate.getTime()];
if (toDate) {
sql = `${sql} AND time_from < ?`
sql = `${sql} AND time_from <= ?`
params.push(toDate.getTime());
}