From 39c6f6fdd121eedd4b3ee31bedda6a5da785f28e Mon Sep 17 00:00:00 2001 From: mamoss <> Date: Tue, 13 Jan 2026 04:28:58 +0700 Subject: [PATCH] set datetimezone --- src/controllers/OrganizationDotnetController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 0ab0bbc9..75dd9c55 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -6949,7 +6949,9 @@ export class OrganizationDotnetController extends Controller { break; } } - const date = body.date.setHours(23, 59, 59, 999); + const date = body.date ? new Date(body.date.toISOString().slice(0, 10)) : new Date(); + // set เวลาเป็น 23:59:59 ของวันนั้น + date.setHours(23, 59, 59, 999); let profile = await this.posMasterHistoryRepository.find({ where: {