feat(timezone): Adds timezone as option
This commit is contained in:
parent
0b9089ffae
commit
b852c06f83
11 changed files with 278 additions and 22 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue