Skip to content

Commit

Permalink
Merge pull request #23 from mkajic20/hotfix/fix-date-formatting
Browse files Browse the repository at this point in the history
Fixed date formatting for current time zone
  • Loading branch information
lgaljer20 authored Jan 24, 2024
2 parents 32230f8 + c11b7cb commit ec99ebd
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 ec99ebd

Please sign in to comment.