Skip to content

Commit

Permalink
fix: time formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmedhossamdev committed Oct 29, 2024
1 parent 10b5c6d commit 7296143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/oba/TripDetailsPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
function formatTime(seconds) {
if (!seconds) return '';
const date = new Date(seconds * 1000);
return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
const utcDate = new Date(date.toUTCString().slice(0, -4));
return utcDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
}
function calculateBusPosition() {
Expand Down

0 comments on commit 7296143

Please sign in to comment.