Adjust time zone offset for date formatting #108

Merged
3019483 merged 1 commits from #99-fix-timezone into main 2025-06-27 07:09:45 +02:00
1 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,11 @@
export const formatDate = (dateString: string): string => {
const date = new Date(dateString);
const date = new Date(dateString);
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are zero-based
const day = String(date.getDate()).padStart(2, '0');
const year = date.getFullYear();
const hours = String(date.getHours() + 2).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
const month = String(date.getMonth() + 1).padStart(2, "0"); // Months are zero-based
const day = String(date.getDate()).padStart(2, "0");
const year = date.getFullYear();
return `${hours}:${minutes} ${day}.${month}.${year}`;
return `${hours}:${minutes} ${day}.${month}.${year}`;
};