Browse Source
Merge pull request #3653 from vvlladd28/bug/device-profile/show-scheduler-time
UI: Fixed show not correct time for device profiles scheduler preview
pull/3703/head
Igor Kulikov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
ui-ngx/src/app/shared/models/device.models.ts
|
|
|
@ -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 { |
|
|
|
|