fixed timezone: removed duplicate +1h from formatDate (tickMarkFormatter already handles it)
This commit is contained in:
@ -4,12 +4,11 @@ import { updateIndicatorCandles } from './indicators-panel-new.js';
|
||||
|
||||
function formatDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const utc1 = new Date(date.getTime() + 3600000);
|
||||
const day = String(utc1.getUTCDate()).padStart(2, '0');
|
||||
const month = String(utc1.getUTCMonth() + 1).padStart(2, '0');
|
||||
const year = String(utc1.getUTCFullYear()).slice(-2);
|
||||
const hours = String(utc1.getUTCHours()).padStart(2, '0');
|
||||
const minutes = String(utc1.getUTCMinutes()).padStart(2, '0');
|
||||
const day = String(date.getUTCDate()).padStart(2, '0');
|
||||
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
|
||||
const year = String(date.getUTCFullYear()).slice(-2);
|
||||
const hours = String(date.getUTCHours()).padStart(2, '0');
|
||||
const minutes = String(date.getUTCMinutes()).padStart(2, '0');
|
||||
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user