Skip to content

Commit

Permalink
Fixed date formatting for current time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
mkajic20 committed Jan 24, 2024
1 parent 32230f8 commit c11b7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Software/smart-charger/src/utils/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export const formatDate = (inputDate) => {
const month = String(date.getMonth() + 1).padStart(2, "0");
const year = date.getFullYear();

const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
const hours = String(date.getUTCHours()).padStart(2, "0");
const minutes = String(date.getUTCMinutes()).padStart(2, "0");

return `${day}.${month}.${year}. ${hours}:${minutes}`;
};

0 comments on commit c11b7cb

Please sign in to comment.