fix charts to use local time

This commit is contained in:
Face 2025-06-10 16:30:10 +03:00
parent e82866f39b
commit 55ca8d3260
4 changed files with 18 additions and 10 deletions

View file

@ -334,3 +334,8 @@ export function showSchoolPrideCannons(confetti: any) {
}
export const formatMarketCap = formatValue;
export function timeToLocal(originalTime: number): number {
const d = new Date(originalTime * 1000);
return Math.floor(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()) / 1000);
}