UI: Fixed show not correct time for device profiles scheduler preview
This commit is contained in:
parent
94addec69d
commit
b9950d82e9
@ -26,7 +26,7 @@ import { EntityInfoData } from '@shared/models/entity.models';
|
||||
import { KeyFilter } from '@shared/models/query/query.models';
|
||||
import { TimeUnit } from '@shared/models/time/time.models';
|
||||
import * as _moment from 'moment-timezone';
|
||||
import { AbstractControl, FormGroup, ValidationErrors } from '@angular/forms';
|
||||
import { AbstractControl, ValidationErrors } from '@angular/forms';
|
||||
|
||||
export enum DeviceProfileType {
|
||||
DEFAULT = 'DEFAULT'
|
||||
@ -513,7 +513,7 @@ export function timeOfDayToUTCTimestamp(date: Date | number): number {
|
||||
}
|
||||
|
||||
export function utcTimestampToTimeOfDay(time = 0): Date {
|
||||
return new Date(time + new Date().getTimezoneOffset() * 60 * 1000);
|
||||
return new Date(time + new Date(time).getTimezoneOffset() * 60 * 1000);
|
||||
}
|
||||
|
||||
function timeOfDayToMoment(date: Date | number): _moment.Moment {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user