All files / src/decorators timezone.decorator.ts

100% Statements 5/5
75% Branches 3/4
100% Functions 2/2
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 71x 1x   1x 98x    
import { DateUtils } from '@logchain/utils';
import { Transform } from 'class-transformer';
 
export function TimeZoneTransform() {
    return Transform(({ value, obj }) => DateUtils.convertTimeZone(value, obj.groups?.[0]));
}