Skip to content

Commit 596164c

Browse files
wroking perfect on local
1 parent f331bdf commit 596164c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/pdf/pdf.controller.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@ export class PdfController {
6464
@Query('endDate') endDate: string,
6565
): Promise<void> {
6666
// Convert string inputs to dates
67-
const start = moment(startDate).tz('Asia/Tokyo').toDate();
68-
const end = moment(endDate).tz('Asia/Tokyo').toDate();
69-
70-
// Adjust to start-of-day and end-of-day
71-
start.setHours(0, 0, 0, 0);
72-
end.setHours(23, 59, 59, 999);
67+
const start = moment(startDate).tz('Asia/Tokyo').startOf('day').toDate();
68+
const end = moment(endDate).tz('Asia/Tokyo').endOf('day').toDate();
7369

7470
// Validate that start is not after end
7571
if (start > end) {

0 commit comments

Comments
 (0)