Visual Console Refactor: fixed the clock date

Former-commit-id: 6864b784b4353b63e152d709627f0ab2c0d0205b
This commit is contained in:
Alejandro Gallardo Escobar 2019-04-17 14:17:26 +02:00
parent 0911a00fe9
commit 161bf4c079
4 changed files with 4 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -530,10 +530,9 @@ export default class Clock extends Item<ClockProps> {
*/
private getDate(): Date {
const d = new Date();
const targetTZOffset = this.props.clockTimezoneOffset * 60 * 1000; // In ms.
const targetTZOffset = this.props.clockTimezoneOffset * 1000; // In ms.
const localTZOffset = d.getTimezoneOffset() * 60 * 1000; // In ms.
const utimestamp = d.getTime() + targetTZOffset + localTZOffset;
console.log(targetTZOffset, localTZOffset);
return new Date(utimestamp);
}