From 7571b6873cc7d141a2980ee701ccb7eda7472216 Mon Sep 17 00:00:00 2001 From: Huachao Mao Date: Wed, 29 Jul 2020 13:10:42 +0800 Subject: [PATCH] Fix localDatetime timezone discrepancy in iso8601 format #648 --- src/utils/httpVariableProviders/systemVariableProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/httpVariableProviders/systemVariableProvider.ts b/src/utils/httpVariableProviders/systemVariableProvider.ts index 99c4eb30..bdf22960 100644 --- a/src/utils/httpVariableProviders/systemVariableProvider.ts +++ b/src/utils/httpVariableProviders/systemVariableProvider.ts @@ -134,7 +134,7 @@ export class SystemVariableProvider implements HttpVariableProvider { if (type === 'rfc1123') { return { value: date.locale('en').format('ddd, DD MMM YYYY HH:mm:ss ZZ') }; } else if (type === 'iso8601') { - return { value: date.toISOString() }; + return { value: date.locale('en').format('YYYY-MM-DDTHH:mm:ss.SSSZ') }; } else { return { value: date.format(type.slice(1, type.length - 1)) }; }