diff --git a/addons_extensions/hr_emp_dashboard/static/src/js/profile_component.js b/addons_extensions/hr_emp_dashboard/static/src/js/profile_component.js index 717cb8845..12dd660e0 100644 --- a/addons_extensions/hr_emp_dashboard/static/src/js/profile_component.js +++ b/addons_extensions/hr_emp_dashboard/static/src/js/profile_component.js @@ -146,10 +146,10 @@ export class NetflixProfileContainer extends Component { attendanceLines.forEach(line => { let createDate = new Date(line.create_date); line.create_date = createDate.toISOString().split('T')[0]; // Format as 'YYYY-MM-DD' - let checkIn = new Date(line.check_in); - line.check_in = checkIn.toTimeString().slice(0, 5); // Format as 'HH:MM' - let checkOut = new Date(line.check_out); - line.check_out = checkOut.toTimeString().slice(0, 5); // Format as 'HH:MM' + let checkIn = new Date(line.check_in + 'Z'); + line.check_in = checkIn.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit', timeZone:'Asia/Kolkata'}); // Format as 'HH:MM' + let checkOut = new Date(line.check_out + 'Z'); + line.check_out = checkOut.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit', timeZone:'Asia/Kolkata'}); // Format as 'HH:MM' line.worked_hours = line.worked_hours.toFixed(2); }); this.state.attendance_lines = attendanceLines,