From 46b1739e299444ce9134f4236a63744998989451 Mon Sep 17 00:00:00 2001 From: Stephen Collins Date: Wed, 10 Jun 2020 02:55:17 -0400 Subject: [PATCH] Added timezoneOffset prop to readDateTimeOffset Returning this will allow consuming libraries to provide accurate timezone information --- src/value-parser.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/value-parser.ts b/src/value-parser.ts index b9b4929ff..79b46b8c3 100644 --- a/src/value-parser.ts +++ b/src/value-parser.ts @@ -706,6 +706,10 @@ function readDateTimeOffset(parser: Parser, dataLength: number, scale: number, c enumerable: false, value: time.nanosecondsDelta }); + Object.defineProperty(date, 'timezoneOffset', { + enumerable: false, + value: timezoneOffset + }); callback(date); }); });