This commit is contained in:
Stephen Gesityan 2025-05-15 05:02:02 +07:00
commit 39f984a3e5
1 changed files with 6 additions and 1 deletions

View File

@ -418,7 +418,12 @@ function formatPrice(price) {
bookingEnd.setHours(bookingEnd.getHours() + parseInt(selectedDuration)); bookingEnd.setHours(bookingEnd.getHours() + parseInt(selectedDuration));
const endTimeFormatted = ('0' + bookingEnd.getHours()).slice(-2) + ':' + ('0' + bookingEnd.getMinutes()).slice(-2); const endTimeFormatted = ('0' + bookingEnd.getHours()).slice(-2) + ':' + ('0' + bookingEnd.getMinutes()).slice(-2);
const today = new Date().toISOString().split('T')[0];
// PERUBAHAN DI SINI: Gunakan tanggal WIB dengan menambahkan offset +7 jam
const nowUtc = new Date();
const jakartaTime = new Date(nowUtc.getTime() + (7 * 60 * 60 * 1000));
const today = jakartaTime.toISOString().split('T')[0];
const start_time = `${today} ${selectedTime}`; const start_time = `${today} ${selectedTime}`;
const end_time = `${today} ${endTimeFormatted}`; const end_time = `${today} ${endTimeFormatted}`;